[removed].href not working in form onsubmit

后端 未结 4 1080
悲&欢浪女
悲&欢浪女 2020-12-08 23:35

So i have a form, and onsubmit=\"return reg_check(this)\" where reg_check() is a javascript function in the header which is supposed to check the f

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 00:03

    I've seen problems in IE where I've had to do the following:

    window.location.assign(url);
    

    Specifically within a jQuery AJAX success handler. Can't really speculate to why other than for me, it worked.

    Actually I did

    window.location.replace(url)
    

    Which replaces the current page in the history. Nice trick that!

提交回复
热议问题