On - [removed].hash - Change?

后端 未结 13 1346
谎友^
谎友^ 2020-11-21 13:38

I am using Ajax and hash for navigation.

Is there a way to check if the window.location.hash changed like this?

http://example.com/blah

13条回答
  •  无人共我
    2020-11-21 13:55

    HTML5 specifies a hashchange event. This event is now supported by all modern browsers. Support was added in the following browser versions:

    • Internet Explorer 8
    • Firefox 3.6
    • Chrome 5
    • Safari 5
    • Opera 10.6

提交回复
热议问题