点击事件
<body>
<input type="button" value="点我" οnclick="acert("button");" />
<a href="javascript:alert('hello')">点击我显示Hello</a>//超链接的href中加入js才需要加"javascript:",因为他不是事件,而是把“javascript:”看成像“http:”、“ftp:”一样的网络协议
<a href="无效.html" οnclick="alert('hello2')">点我显示hello2</a>//先触发onclick,再导向至无效.html
</body>