NS_BINDING_ABORTED Javascript [removed].replace()

前端 未结 1 761
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-19 23:30

I\'m writing some Javascript code and I\'m trying to change the current page as the result of the user clicking a button. I\'m using this snippet of code:

window.loc

相关标签:
1条回答
  • 2021-01-20 00:14

    You may get NS_BINDING_ABORTED when a load is interrupted by something else, typically a page navigation.

    How are you calling this method? If it's in response to a click on a link or button, you may be forgetting to return false to cancel the default action. In which case first your script would start to navigate to /customer/order/12, then the link or form would be followed, causing a navigation that cancels your script's one.

    0 讨论(0)
提交回复
热议问题