Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q688 Where do I put my JavaScript code to make sure that it is executed only after the HTML page is completely loaded?

You are here: irt.org | FAQ | JavaScript | General | Q688 [ previous next ]

In a function that is called by an onLoad event handler:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function functionName() {
// include your code here
}
//--><SCRIPT>
</HEAD>

<BODY onLoad="functionName()">
...
</BODY>
</HTML>

©2018 Martin Webb