hitmill.com
link to hitmill.com home page
 

The JavaScript alert( ) method


 
The alert( ) method is the easiet method in JavaScript to output text to an alert box. The SYNTAX looks like this:
 
alert("the message will go here")
Do not place a space between the t in alert and the first parenthesis.

 
CODE: JavaScript alert() method
 

<HTML>
<HEAD>
<TITLE>The alert ( ) Method</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--Hide from old browsers
alert("Click OK to continue.");
// Stop hiding from old browsers -->
</SCRIPT>
</BODY>
</HTML>


Test your own message in an alert box:
Type a short alert:

Back to the JavaScript page.
Return to the script list.

 

 

 


 
Contact Webmaster
 
Updated
© hitmill.com
All Rights Reserved