QuickTip
What you saw was an alert box.
Alerts can be helpful, but they can be extremely annoying when overused. There are different places you can put them. The most common alert is used in between the <head> and the </head> tags. Here's the code:

<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>