Why does history back not work on onclick in Firefox?

后端 未结 4 1723
[愿得一人]
[愿得一人] 2021-02-06 02:50

I don\'t understand why in Firefox, window.history.back() does work on a button:

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-06 03:46

    Try this:

    $("#back").click(function(e) {
        e.preventDefault();
        history.back(1);
    })
    

    or

     Link 
    

提交回复
热议问题