How to have form redirect on submit

This question already has an answer here:

  • How do I redirect with JavaScript? [duplicate] 6 answers

  • if (status === "success") {
      window.location = 'https://google.com';
    }
    

    Some ways to redirect Page:

    // Sets the new location of the current window.

    window.location = "http://www.google.com";
    

    // Sets the new href (URL) for the current window.

    window.location.href = "http://www.google.com";
    

    // Assigns a new URL to the current window.

    window.location.assign("http://www.google.com");
    

    // Replaces the location of the current window with the new one.

    window.location.replace("http://www.google.com");
    
    链接地址: http://www.djcxy.com/p/34728.html

    上一篇: 如何在使用PHP的重定向页面上跟踪Google Analytics?

    下一篇: 如何在提交表单时重定向