首页 > 代码库 > jquery 预览提交的表单

jquery 预览提交的表单

预览表单,查看后确认提交或者返回重填

jquery 预览提交的表单
演示

 

 

XML/HTML Code
  1. <form class="mform" id="myform" method="POST" id="myform" action="">  
  2. <fieldset>  
  3. <legend>Registeration</legend>  
  4. <table cellspacing="0">  
  5. <tbody>  
  6. <tr>  
  7. <td><label for="u_name"> Username :</label></td>  
  8. <td><input type="text" name="uname" id="u_name">  
  9. <td>  
  10. </tr>  
  11. <tr>  
  12. <td><label for="u_pwd"> Password :</label></td>  
  13. <td><input type="password" name="uname" id="u_pwd"></td>  
  14. </tr>  
  15. <tr>  
  16. <td><label for="u_mail"> Email :</label></td>  
  17. <td><input type="email" name="uname" id="u_mail"></td>  
  18. </tr>  
  19. <tr>  
  20. <td><label for="u_country"> Country :</label></td>  
  21. <td><select name="Country" id="u_country">  
  22. <option value="" selected="selected">Select Country</option>  
  23. <option value="United States">United States</option>  
  24. <option value="United Kingdom">United Kingdom</option>  
  25. <option value="China">China</option>  
  26. </select></td>  
  27. </tr>  
  28. <tr>  
  29. <td><span> Gender :</span></td>  
  30. <td><input type="radio" name="gender" id="male" value="male">  
  31. <label for="male"> Male</label>  
  32. <input type="radio" name="gender" id="female"  value="female">  
  33. <label for="female"> Female </label></td>  
  34. </tr>  
  35. <tr>  
  36. <td><label for="subscribe"> Subscribe Us : </label></td>  
  37. <td><input type="checkbox" id="subscribe" name="subscribe" value="yes"></td>  
  38. </tr>  
  39. <tr>  
  40. <td></td>  
  41. <td><input type="submit" value="submit"></td>  
  42. </tr>  
  43. </tbody>  
  44. </table>  
  45. </fieldset>  
  46. </form>  

 

JavaScript Code
  1. <script>  
  2. $(document).ready(function() {  
  3.     $(‘#myform‘).previewForm();  
  4. });  
  5. </script>  

 



<iframe id="google_ads_frame2" vspace="0" height="250" marginHeight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3447371224873639&output=html&h=250&slotname=8660799060&adk=1970350646&w=300&lmt=1400601215&flash=0&url=http%3A%2F%2Fwww.cnblogs.com%2Franzige%2Fp%2F3738710.html&dt=1400601215694&shv=r20140513&cbv=r20140417&saldr=sb&correlator=1400601215478&frm=20&ga_vid=241618604.1400321121&ga_sid=1400585244&ga_hid=153217284&ga_fc=1&u_tz=480&u_his=598&u_java=1&u_h=768&u_w=1364&u_ah=740&u_aw=1364&u_cd=16&u_nplug=0&u_nmime=0&dff=tahoma&dfs=12&adx=0&ady=2261&biw=314&bih=74&eid=317150304&oid=3&rx=0&eae=0&docm=9&vis=0&fu=0&ifi=2&xpc=CiD7vyKXSC&p=http%3A//www.cnblogs.com&dtd=55" frameBorder="0" width="300" allowTransparency="true" name="google_ads_frame2" marginWidth="0" scrolling="no" hspace="0"></iframe><iframe id="google_ads_frame3" vspace="0" height="250" marginHeight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3447371224873639&output=html&h=250&slotname=8660799060&adk=1970350646&w=300&lmt=1400601215&flash=0&url=http%3A%2F%2Fwww.cnblogs.com%2Franzige%2Fp%2F3738710.html&dt=1400601215758&shv=r20140513&cbv=r20140417&saldr=sb&prev_slotnames=8660799060&correlator=1400601215478&frm=20&ga_vid=241618604.1400321121&ga_sid=1400585244&ga_hid=153217284&ga_fc=1&u_tz=480&u_his=598&u_java=1&u_h=768&u_w=1364&u_ah=740&u_aw=1364&u_cd=16&u_nplug=0&u_nmime=0&dff=tahoma&dfs=12&adx=304&ady=2511&biw=314&bih=74&eid=317150304&oid=3&rx=0&eae=0&docm=9&vis=0&fu=0&ifi=3&xpc=2ffBDxvXNx&p=http%3A//www.cnblogs.com&dtd=44" frameBorder="0" width="300" allowTransparency="true" name="google_ads_frame3" marginWidth="0" scrolling="no" hspace="0"></iframe>