Plug-in JavaScript Chapter 12, Example 92 (Click on the icon to view the source for copy and pasting)
» Run this code now (Right click and select Back to return from the example)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html><head><title>Plug-in JavaScript: Example 92</title>

<script src="PJ.js"></script>


Email: <input id='email' type='text' name='email' />
<button id='button'>Submit</button>


window.onload = function()
   O('button').onclick = function()
      if (ValidateEmail(O('email').value)) alert("That address is valid")
      else alert("That email address is invalid")