admin管理员组文章数量:1429075
I am registering a function with the onload method of a html form, I need to unregister this event hander function on unload of the form. How do I do it in Internet Explorer 6?
I am registering a function with the onload method of a html form, I need to unregister this event hander function on unload of the form. How do I do it in Internet Explorer 6?
Share Improve this question edited Jan 13, 2009 at 11:55 Jonathan Lonowski 124k35 gold badges202 silver badges202 bronze badges asked Jan 13, 2009 at 11:43 BillamamaBillamama 1- Thanks, I could get it working based on Dimi's reference. Thanks for your ments too meouw. – Billamama Commented Jan 13, 2009 at 12:21
2 Answers
Reset to default 7if you have added the onload in your HTML or via JavaScript
<form onload="blah()">
or
myForm.onload = blah;
then
myForm.onload = null;
should do it
if you've used attachEvent
myForm.attachEvent( 'onload', blah );
use
myForm.detachEvent( 'onload', blah );
EDIT
I'm not sure forms have onload events tho, are you sure?
Use detachEvent
Reference
本文标签: javascriptHow to unregister an event handler in Internet Explorer 6Stack Overflow
版权声明:本文标题:javascript - How to unregister an event handler in Internet Explorer 6? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745542291a2662547.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论