Jump to content

'onload' message will not work!


Chris 101
 Share

Recommended Posts

Hi again!Could someone tell me whats wrong with the following script?

<html><head><script type="text/javascript">function mymessage(){alert("This message was triggered from the onload event")}</script></head><body onload="mymessage()"></body></html>

I think there is a problem with <body onload="mymessage()> :):) Thank you! :):blink:

Link to comment
Share on other sites

It seems to be working fine for me too.Just check for double quotes and stuff... If you have the code same as in the "codebox" then it should be working, but in your post the <body onload="mymessage()> in the red font seems to be missing a ending double quotes..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...