Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 0.53 KB  |  hits: 12  |  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. <form>
  2.   Name:  <input type="textbox" name="name" /> <br />
  3.   Check box if you're alive:  <input type="checkbox" name="alive" /> <br />
  4.   <input type="button" name="submit" value="we win click!" onClick="pulse(form)" />
  5. </form>
  6.  
  7. <script type="text/javascript">
  8. function pulse(data){
  9.  
  10. console.log(data);
  11.  
  12. // uncomment below and fix
  13.  
  14. // var isAlive = data....
  15. // var name = data....
  16. /*
  17.     if (isAlive) {
  18.         alert("Thank goodness you're alive," + name);
  19.     }
  20.     else {
  21.         alert("Oh, no!" + name + "Don't die!");
  22.     }
  23. */
  24. }
  25. </script>