alert() will cause an alert box to pop up. The string parameter (what's in the parentheses) will be the message. This function is used for sending messages to the user. If you need the user to respond then use prompt().
Examples:
The code:
<script type="text/javascript"> alert('This code get run when encountered in the script element below'); </script>