Algemeen en interessant nieuws over en door NosTech


Appending to event functions in javascript.
11-06-2009 16:02

Asked question: I have this code. later in javascript I want to add javascript like document.body.onload= “funcSetByJS()” How can use the document.body.onload=“ code without killing the code I set in the html? I want the onload to look like this when i am done. onload="funcSetByHTML(); nFunctionsIDontKnowWhatTheyWillBe(); funcSetByJS()”. I need a way to append to the onload event, rather then rest it? Can this be done?

See the link for the answer.


< Alle nieuws