2019独角兽企业重金招聘Python工程师标准>>>
HTML事件包括如下
1.HTML页面加载完成
2.HTML input字段发生改变
3.HTML 按钮被点击
示例:HTML 按钮被点击
<!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>