编辑下面的代码:【加编码】
<html> <body> <p>使用 addEventListener() 方法来向文档添加点击事件。</p> <p>点击文档任意处。</p> <script> document.addEventListener("click", myFunction); document.addEventListener("click", someOtherFunction); function myFunction() { alert ("Hello World!") } function someOtherFunction() { alert ("该函数同样执行!") } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂