<script language="javascript"> alert("The stuff you want in the alert box goes here") </script> |
That's all there is to it. Here's another way, which is just as easy (this goes in the <body> tag):
<body onLoad="alert('The stuff you want in the alert box goes here')"
Here's an annoying use: Click here!
Here's the code:
<a href="frames.html" onMouseover="alert('This is an alert box that is triggered by moving over the link')">Click Here!</a>
|
I'd recommend you don't use that; I just wanted to show it to you. One final way that I am going to show you, and it is right here:
This one's really easy, too. Here's the script:
<form> <input type="button" value="Click here!" onClick="alert('Thank you for clicking. Have a nice day!')"> </form>