[removed] = #anchor doesn't work in IE

前端 未结 6 541
南笙
南笙 2020-12-10 09:24

On this map:

http://web.pacific.edu/documents/marketing/campus-map/version%202/stockton-campus-2.0.htm

I have an anchor at the top, and I want the page to ju

6条回答
  •  再見小時候
    2020-12-10 09:47

    You have to check for hash before appending it. I did it with this,

    window.location = ((location.href).indexOf('#') == -1 ? location.href + "#top" : location.href);

提交回复
热议问题