home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 June / MacHome Magazine Demo Disc June 2001.iso / Stuff / Software / Graphic / PageSpinner 3.0.2 / Examples / JavaScript / Alert Stationery next >
Encoding:
Text File  |  2000-10-16  |  1000 b   |  32 lines  |  [TEXT/JyWs]

  1. <html><head>
  2. <title>JavaScript Alert</title>
  3. </head>
  4. <body bgcolor="FFFFFF" text="000000" onLoad="window.alert('Welcome!');">
  5. <h1>JavaScript Alert</h1>
  6.  
  7. <b>This page contains an example of a link that displays an alert</b>
  8. <p>
  9. <a href="#"
  10.  onClick="window.alert('This is a special message to you!');"
  11.  onMouseOver="window.status='This is not a regular link'; return true">Example</a> of a link displaying an alert dialog.</p>
  12.  
  13. <hr>
  14. <b>How to use:</b>
  15. <p>
  16. Use something like this inside the contents of your page to create a link that will display an alert.</p>
  17.  
  18. <pre><A HREF="#"
  19.  onClick="window.alert('This is a special message to you!');"
  20.  onMouseOver="window.status='This is not a regular link'; return true">Example</A>
  21.  of a link displaying an alert dialog.</pre>
  22. <hr>
  23. <p>
  24. You can also use the following Body tag:</p>
  25.  
  26. <p><code><BODY onLoad="window.alert('Welcome!');"></code></p>
  27.  
  28. <p>to display an <blink>annoying</blink> alert every time the page is loaded.
  29.  
  30. </body>
  31. </html>
  32.