+ 3

help me!!? javascript

I have in Java script there is a function which does something when the page loads.How do I cancel this function when I click?

22nd Sep 2018, 11:15 PM
GSS
GSS - avatar
4 Answers
+ 2
Hey GSS! Your question is some kind of uncertain in meaning and direction. Would you please specify it and maybe give us some code to check? Nonetheless let's try to give you a more specific answer and maybe progress in solving your problem. Generally you will find a lot of information regarding this and other topics out "there" in the www. But especially regarding HTML, CSS, Javascript, jQuery and many other web orientated languages you will be able to find useful information on "w3schools.com". Concerning your eventhandling "onload" please see this link: https://www.w3schools.com/jsref/event_onload.asp and also please read this one right here: http://learn.jquery.com/using-jquery-core/document-ready/ conclusion: "load/onload" is a status which can't be changed no matter the browser is finished loading the site or not. You can work with the status, but you can't change/cancel it. also it is not wise, recommended or safe to manipulate a site before it is ready. hope this does help you. greetings
23rd Sep 2018, 6:50 AM
[No Name]
[No Name] - avatar
+ 1
??
22nd Sep 2018, 11:20 PM
GSS
GSS - avatar
0
What you mean for "cancel this function"?
22nd Sep 2018, 11:23 PM
KrOW
KrOW - avatar
0
jQuery: onload() Vs. $.ready()? The ready event occurs after the HTML document has been loaded, while the onload event occurs later, when all content (e.g. images) also has been loaded. The key difference between $(document).ready() and $(window).load() event is that the code included inside onload function will run once the entire page(images, iframes, stylesheets,etc) are loaded whereas the $(document).ready() event fires before all images,iframes etc. are loaded, but after the whole DOM itself is ready. http://net-informations.com/jq/iq/onload.htm
24th Aug 2020, 5:55 AM
rahul kumar
rahul kumar - avatar