GlobalEventHandlers.onreset
The GlobalEventHandlers.onreset
属性包含 event handler
,当收到一个reset (en-US)
事件时触发
语法
window.onreset = funcRef;
参数
funcRef
是一个函数的引用.
例子
<html> <script> function reg() { window.captureEvents(Event.RESET); window.onreset = hit; } function hit() { alert('hit'); } </script> <body onload="reg();"> <form> <input type="reset" value="reset" /> </form> <div id="d"> </div> </body> </html>
备注
reset 事件只有在用户点击表单中的reset按钮时才会被触发 (<input type="reset"/>
).
规范
规范 | 状态 | 评论 |
---|---|---|
HTML Living Standard onreset |
Living Standard |