最简单的一个例子:<inputtype="button"value="测试"onclick="alert('这是一个事件测试')"/>如果实现更复杂的功能可以写一个函数,然后在事件里调用如:
<script>functionbutton_onclick(){//这里写你要执行的语句alert("这是调用函数");}</script><inputtype="button"value="测试"onclick="javascript:button_onclick();"/>
顶一下

(0)
0%
踩一下

(0)
0%
- 相关评论
- 我要评论
-