javascript - How to unregister an event handler in Internet Explorer 6? - Stack Overflow

I am registering a function with the onload method of a html form, I need to unregister this event hand

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
Add a ment  | 

2 Answers 2

Reset to default 7

if 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745542292a4632181.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信