Detect change in hash value of URL using JavaScript

前端 未结 3 1207
清酒与你
清酒与你 2021-01-30 14:05

I\'m working on a simple application which is single page based (due to project restrictions) and has dynamic content. I understand the dynamic content alright but what I don\'t

3条回答
  •  醉话见心
    2021-01-30 14:15

    personally, I'd use sammy which gives you the flexibility to template the hashtag (add placeholders and be able to read them back). e.g.

    
    
    
    
    Load foo.html
    Load bar.html
    

    An example can be found here: http://jsfiddle.net/KZknm/1/

提交回复
热议问题