Is there a cross-browser onload event when clicking the back button?

后端 未结 15 2282
被撕碎了的回忆
被撕碎了的回忆 2020-11-21 22:46

For all major browsers (except IE), the JavaScript onload event doesn’t fire when the page loads as a result of a back button operation — it only fires when the

15条回答
  •  甜味超标
    2020-11-21 23:12

    I tried the solution from Bill using $(document).ready... but at first it did not work. I discovered that if the script is placed after the html section, it will not work. If it is the head section it will work but only in IE. The script does not work in Firefox.

提交回复
热议问题