How to jump to top of browser page

后端 未结 8 892
后悔当初
后悔当初 2020-12-22 15:48

I\'m writing a modal popup and I need the browser to jump to the top of the screen when the open modal button is pressed. Is there a way to scroll the browser to the top usi

8条回答
  •  一个人的身影
    2020-12-22 16:27

    You could do it without javascript and simply use anchor tags? Then it would be accessible to those js free.

    although as you are using modals, I assume you don't care about being js free. ;)

提交回复
热议问题