HTML事件包括以下javascript
1.HTML页面加载完成html
2.HTML input字段发生改变java
3.HTML 按钮被点击ui
示例:HTML 按钮被点击code
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title> This is my HTML </title> <script type="text/javascript"> function displayDate() { document.getElementById("test").innerHTML=Date(); } </script> </head> <body> <button onclick="displayDate()">点击</button> <p id="test"></p> </body> </html>