通过 input button 而不是input submit提交。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript">
    $(function(){
        $('input:button').click(function(){
          $('#form1').submit();    
        });    
    });
    </script>
</head>
<body>
    <form id="form1">
    <input type="text" name="info" placeholder="Input info..."/>
    <input type="button" value="Submit Form"/>
    </form>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2021-04-14
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-02-18
猜你喜欢
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案