Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: incrediBILL

Message Too Old, No Replies

<script onload don't work for me in IE

     

Xuefer

5:48 am on Nov 19, 2005 (gmt 0)

10+ Year Member



version: IE 6 xpsp2
document: msdn said <script> element has onload event.
code:
<script src="http://../...js" onload="alert()"></script>
(i have tried <script onload="alert()"> ... </script>)
expected: an alert box
result: nothing happened

any idea?

kaled

11:44 am on Nov 19, 2005 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Try <body onload=alert()>

Kaled.

Xuefer

12:21 pm on Nov 21, 2005 (gmt 0)

10+ Year Member



yeah, thx, i know that one
just wonder why the script's one doesn't work
i though i can get the event fired as soon as the script is loaded, not the slow body onload
but okay, i found it's equ to
<script src=..></script>
<script>this_is_the_script_onload_event()</script>