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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745542292a4632181.html
评论列表(0条)