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

前端 未结 6 540
南笙
南笙 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:48

    I have this code in production and it works fine in IE7...

    location.hash = "#top";
    

    However, if you are just trying to scroll to the top, this ought to be a lot easier...

    window.scrollTo(0, 0);
    

提交回复
热议问题