对事件作出反应

来源:互联网 发布:大华网络监控方案 编辑:程序博客网 时间:2024/05/17 07:25


<button type="button" onclick="alert('Welcome!')">点击这里</button>




<!DOCTYPE html>
<html>
<body>

<h1>我的第一段 JavaScript</h1>

<p>
JavaScript 能够对事件作出反应。比如对按钮的点击:
</p>


<button type="button" onclick="alert('Welcome!')">点击这里</button>


</body>
</html>


0 0