After the XMLHttpRequest submits the form, it will jump the page according to the returned results, but window.location.href Invalid jump
3 Answers
The problem has been solved because the ajaxcheck() function is triggered when the form is submitted. After the function is executed, it does not return false to prevent the form from submitting. As a result, the page will refresh, and it cannot jump correctly.
If the onsubmit function does not return, the default return value is false.
There is no problem with the following method.
Print out window.location.href Jump to the address, and then copy to the browser to see if you can enter, determine whether the URL problem
Can the login OK window pop up?
Can pop up, just can’t jump to the registration page