在表单验证中。有时候我们需要阻止其提交

<html>
 <head>
  <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
  <script type="text/javascript">
   $(function(){
    $('form').bind('submit',function(){
     return false;
    });
   })
  </script>
 </head>
 <body>
  <form action="">
   <input type="submit" value="submit">
  </form>
 </body>
</html>

Comments are closed.

Post Navigation