1. <tfoot id='iEyWF'></tfoot>
    2. <small id='iEyWF'></small><noframes id='iEyWF'>

          <bdo id='iEyWF'></bdo><ul id='iEyWF'></ul>

        <i id='iEyWF'><tr id='iEyWF'><dt id='iEyWF'><q id='iEyWF'><span id='iEyWF'><b id='iEyWF'><form id='iEyWF'><ins id='iEyWF'></ins><ul id='iEyWF'></ul><sub id='iEyWF'></sub></form><legend id='iEyWF'></legend><bdo id='iEyWF'><pre id='iEyWF'><center id='iEyWF'></center></pre></bdo></b><th id='iEyWF'></th></span></q></dt></tr></i><div id='iEyWF'><tfoot id='iEyWF'></tfoot><dl id='iEyWF'><fieldset id='iEyWF'></fieldset></dl></div>
        <legend id='iEyWF'><style id='iEyWF'><dir id='iEyWF'><q id='iEyWF'></q></dir></style></legend>

        如何跳转到浏览器页面顶部

        时间:2023-06-21
          • <bdo id='VwPTv'></bdo><ul id='VwPTv'></ul>

              <small id='VwPTv'></small><noframes id='VwPTv'>

                <tbody id='VwPTv'></tbody>
              <i id='VwPTv'><tr id='VwPTv'><dt id='VwPTv'><q id='VwPTv'><span id='VwPTv'><b id='VwPTv'><form id='VwPTv'><ins id='VwPTv'></ins><ul id='VwPTv'></ul><sub id='VwPTv'></sub></form><legend id='VwPTv'></legend><bdo id='VwPTv'><pre id='VwPTv'><center id='VwPTv'></center></pre></bdo></b><th id='VwPTv'></th></span></q></dt></tr></i><div id='VwPTv'><tfoot id='VwPTv'></tfoot><dl id='VwPTv'><fieldset id='VwPTv'></fieldset></dl></div>
            1. <tfoot id='VwPTv'></tfoot>
                • <legend id='VwPTv'><style id='VwPTv'><dir id='VwPTv'><q id='VwPTv'></q></dir></style></legend>
                  本文介绍了如何跳转到浏览器页面顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在编写一个模式弹出窗口,当按下打开模式按钮时,我需要浏览器跳转到屏幕顶部.有没有办法使用jQuery将浏览器滚动到顶部?

                  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 using jQuery?

                  推荐答案

                  你可以设置scrollTop,像这样:

                  $('html,body').scrollTop(0);
                  

                  或者如果你想要一个小动画而不是快速到顶部:

                  Or if you want a little animation instead of a snap to the top:

                  $('html, body').animate({ scrollTop: 0 }, 'fast');
                  

                  这篇关于如何跳转到浏览器页面顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:当用户尝试离开页面而不保存时创建确认 JavaScript 下一篇:表单提交前的引导模式

                  相关文章

                • <i id='1TEM1'><tr id='1TEM1'><dt id='1TEM1'><q id='1TEM1'><span id='1TEM1'><b id='1TEM1'><form id='1TEM1'><ins id='1TEM1'></ins><ul id='1TEM1'></ul><sub id='1TEM1'></sub></form><legend id='1TEM1'></legend><bdo id='1TEM1'><pre id='1TEM1'><center id='1TEM1'></center></pre></bdo></b><th id='1TEM1'></th></span></q></dt></tr></i><div id='1TEM1'><tfoot id='1TEM1'></tfoot><dl id='1TEM1'><fieldset id='1TEM1'></fieldset></dl></div>
                    <legend id='1TEM1'><style id='1TEM1'><dir id='1TEM1'><q id='1TEM1'></q></dir></style></legend>
                    <tfoot id='1TEM1'></tfoot>

                      <small id='1TEM1'></small><noframes id='1TEM1'>

                        <bdo id='1TEM1'></bdo><ul id='1TEM1'></ul>