javascript - How to remove onload event from body tag -


this question has answer here:

i've this government site page , using developer console want remove onload event attached body tag entering code in console:

var script = document.createelement("script"); script.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; document.head.appendchild(script);  //wait jquery library load settimeout(function(){  $("body").unbind("onload");  $("body").get(0).onload = null;   }, 3000); 

but not work.

what way remove handler attached javascript code? since i'll need remove using attache js code in google chrome extension.

i've not yet tried code in google chrome extension. first want make work using developer console.

the following jquery remove onload function body tag:

$('body').off('load'); 

see more off here


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

javascript - Bootstrap Popover: iOS Safari strange behaviour -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -