javascriptEnhancedForm.html 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title>Javascript Enhanced Page</title>
  5. </head>
  6. <body>
  7. <form id="form1" action="javascriptEnhancedForm.html" method="post">
  8. <p>
  9. <label id="labelforusername" for="username">
  10. Username: <input id="username" type="text" name="username" />
  11. <script type="text/javascript">
  12. document.getElementById('username').value = 'Michael';
  13. </script>
  14. </label>
  15. </p>
  16. <p>
  17. <label for="password">
  18. Password: <input id="password" type="password" name="password" />
  19. <script type="text/javascript">
  20. var z = document.getElementById('password'); setTimeout('try{z.focus();z.select();} catch(e) {}', 1);
  21. </script>
  22. </label>
  23. </p>
  24. <p>
  25. <input type="submit" value="Submit" />
  26. </p>
  27. </form>
  28. </body>
  29. </html>