How to redirect user to another page after Ajax form submission?

前端 未结 4 1987
盖世英雄少女心
盖世英雄少女心 2021-01-21 03:51

I\'m having problems redirecting the user to a thank you page after a successful form completion. What happens is that after the form submits, it goes to a blank page (https://c

4条回答
  •  庸人自扰
    2021-01-21 04:15

    Try:

    $('#theForm').ajaxForm(function() { 
     success : function(){
        window.location.href = "Url to redirect here in the success option";
     }
    });
    

提交回复
热议问题