daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Nov 19th, 2018 75 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <!doctype html>
  2. <html lang="en">
  3.   <head>
  4.     <title>Submit!</title>
  5.   </head>
  6.   <body>
  7.    
  8.     <form id="PersonAdd" action="person-add.php" method="post">
  9.       <input name="name" value="Bill Criswell">
  10.       <input name="age" value="26">
  11.       <select name="sex">
  12.         <option value="male">Male</option>
  13.         <option value="female">Female</option>
  14.       </select>
  15.       <input type="checkbox" name="attributes[]" value="Awesome"> Awesome
  16.       <input type="checkbox" name="attributes[]" value="Groovy"> Groovy
  17.       <input type="checkbox" name="attributes[]" value="Smelly"> Smelly
  18.       <input type="submit" value="Save">
  19.     </form>
  20.  
  21.     <pre id="output"></pre>
  22.  
  23.     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
  24.     <script>
  25.       $('#PersonAdd').submit(function(e) {
  26.         var $form = $(this);
  27.         $.post( $form.attr('action'), $form.serializeArray(), function( result ) {
  28.           $('#output').html( result ).show();
  29.         });
  30.         e.preventDefault();
  31.       });
  32.     </script>
  33.   </body>
  34. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top