brian said:
question about Onload function
can one define more than one function for Onload ?
<body Onload="function1()">
or can one define multiple functions one after another
like <body Onload="f() g() h()" ???
is there an equivalent function like sleep() in javascript ? so that one
can delay executions of statements via the sleep ?
The value of the onLoad attribute is interpretted as the body of
the onload function. Like any other function, it can contain
several other function calls, separated by semi-colons:
onload="f();g();h()"
Event driven systems like web pages and other GUI interfaces generally
don't provide a sleep(). You always want to be able to detect mouse
and keyboard activity. Instead, you use setTimeout() to schedule some
code to be executed after a delay (specified in milliseconds):
onload="f();g();setTimeout('h()',60000)"