Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

inputform

By: a guest on Mar 27th, 2012  |  syntax: HTML  |  size: 1.66 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <html>
  2. <head>
  3. <title>sForm - Simple Ajax Form Validation</title>
  4. <script src="validate.js" type="text/javascript"></script>
  5.  
  6. </head>
  7.  
  8. <body>
  9.  
  10. <form name="vform" id="vform" method="get" action="test.php">
  11.  
  12. <label for="email">Email: </label>
  13. <input type="text" name="email" id="email" class="email" autocomplete="off">&nbsp;
  14. <img width="16" height="16" name="email" src="img/blank.gif" alt="">
  15. <span class="expl">email address, like user@domain.com</span>
  16.  <br />
  17.  
  18.  <label for="date">Date: </label>
  19.  <input type="text" name="date" id="date" class="required,date" autocomplete="off">&nbsp;
  20.         <img width="16" height="16" name="date" src="img/blank.gif" alt="">
  21.         <span class="expl">only date (mm/dd/yyyy), like 01/31/2008</span>
  22.  <br />
  23.  
  24.  <label for="number">Number: </label>
  25.  <input type="text" name="number" id="number" class="required,number" autocomplete="off">&nbsp;
  26.         <img width="16" height="16" name="number" src="img/blank.gif" alt="">
  27.         <span class="expl">only numbers, like 1234</span>
  28.  <br />
  29.  
  30.  <label for="alpha">Alpha: </label>
  31.  <input type="text" name="alpha" id="alpha" class="required,alpha" autocomplete="off">&nbsp;
  32.         <img width="16" height="16" name="alpha" src="img/blank.gif" alt="">
  33.         <span class="expl">only characters, like abcd</span>
  34.  <br />
  35.  
  36.  <label for="alphanum">Alphanum: </label>
  37.  <input type="text" name="alphanum" id="alphanum" class="required,alphanum" autocomplete="off">&nbsp;
  38.         <img width="16" height="16" name="alphanum" src="img/blank.gif" alt="">
  39.         <span class="expl">numbers and/or characters, like 123abc</span>
  40.  <br />
  41.  
  42.  <br />
  43.  
  44.  <input type="submit" name="submit" id="submit" value="Submit">
  45.  
  46. </form>
  47. </body>
  48. </html>