js事件学习
<!DOCTYPE html>标签:function,load,优秀,js,5.15,table From: https://www.cnblogs.com/wangzelin/p/18194684
<html lang="en">
<head>
<meta charset="UTF-8">
<title>js-常见事件</title>
<style>
table{
margin: 0px auto;
}
</style>
</head>
<body onl oad="load()">
<form style="text-align: center">
<input type="text">
<input type="submit">
<input type="button" value="事件" class="a">
</form>
<br><br><br>
<table width="600px" border="1px" cellspacing="0" >
<tr align="center">
<th>学号</th>
<th>姓名</th>
<th>分数</th>
<th>评语</th>
</tr>
<tr>
<td>001</td>
<td>张三</td>
<td>90</td>
<td>很优秀</td>
</tr>
<tr>
<td>002</td>
<td>李四</td>
<td>92</td>
<td>优秀</td>
</tr>
</table>
<script>
document.getElementById("a").onclick=function (){
alert("我被点击")
}
function load(){
console.log("加载完成");
}
</script>
</body>
</html>