Edit Code in left box and click Show Results button to see the result. | Home
<html> <!-- Mirrored from www.tutorialspoint.com/cgi-bin/practice.cgi?file=jquery_117 by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 01 Sep 2011 14:46:17 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8"><!-- /Added by HTTrack --> <head> <title>the title</title> <script type="text/javascript" src="../jquery/jquery-1.3.2.min.js"></script> <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#driver").click(function(event){ $.post( "../jquery/serialize.html", $("#testform").serialize(), function(data) { $('#stage1').html(data); } ); var str = $("#testform").serialize(); $("#stage2").text(str); }); }); </script> </head> <body> <p>Click on the button to load result.html file:</p> <div id="stage1" style="background-color:blue;"> STAGE - 1 </div> <br /> <div id="stage2" style="background-color:blue;"> STAGE - 2 </div> <form id="testform"> <table> <tr> <td><p>Name:</p></td> <td><input type="text" name="name" size="40" /></td> </tr> <tr> <td><p>Age:</p></td> <td><input type="text" name="age" size="40" /></td> </tr> <tr> <td><p>Sex:</p></td> <td> <select name="sex"> <option value="Male" selected>Male</option> <option value="Female" selected>Female</option> </select></td> </tr> <tr> <td colspan="2"> <input type="button" id="driver" value="Load Data" /> </td> </tr> </table> </form> </body> <!-- Mirrored from www.tutorialspoint.com/cgi-bin/practice.cgi?file=jquery_117 by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 01 Sep 2011 14:46:18 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8"><!-- /Added by HTTrack --> </html> |