HTML Form Redirect After Submit

后端 未结 1 654
我寻月下人不归
我寻月下人不归 2020-12-03 07:57

This is my form code:

相关标签:
1条回答
  • 2020-12-03 08:12

    Try this Javascript (jquery) code. Its an ajax request to an external URL. Use the callback function to fire any code:

    <script type="text/javascript">
    $(function() {
      $('form').submit(function(){
        $.post('http://example.com/upload', function() {
          window.location = 'http://google.com';
        });
        return false;
      });
    });
    </script>
    
    0 讨论(0)
提交回复
热议问题