Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

GlobalEventHandlers.onreset

The GlobalEventHandlers.onreset 属性包含 EventHandler ,当收到一个reset 事件时触发

语法

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>

Notes

reset 事件只有在用户点击表单中的reset按钮时才会被触发 (<input type="reset"/>).

规范

规范 状态 评论
WHATWG HTML Living Standard
onreset
Living Standard  

文档标签和贡献者

 此页面的贡献者: caoruiy
 最后编辑者: caoruiy,