<small id='0EELD'></small><noframes id='0EELD'>

    • <bdo id='0EELD'></bdo><ul id='0EELD'></ul>

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

      <legend id='0EELD'><style id='0EELD'><dir id='0EELD'><q id='0EELD'></q></dir></style></legend>

    1. <tfoot id='0EELD'></tfoot>

      跟踪用户何时点击浏览器上的后退按钮

      时间:2023-09-25
        <legend id='U5YBo'><style id='U5YBo'><dir id='U5YBo'><q id='U5YBo'></q></dir></style></legend>
      1. <tfoot id='U5YBo'></tfoot>
        <i id='U5YBo'><tr id='U5YBo'><dt id='U5YBo'><q id='U5YBo'><span id='U5YBo'><b id='U5YBo'><form id='U5YBo'><ins id='U5YBo'></ins><ul id='U5YBo'></ul><sub id='U5YBo'></sub></form><legend id='U5YBo'></legend><bdo id='U5YBo'><pre id='U5YBo'><center id='U5YBo'></center></pre></bdo></b><th id='U5YBo'></th></span></q></dt></tr></i><div id='U5YBo'><tfoot id='U5YBo'></tfoot><dl id='U5YBo'><fieldset id='U5YBo'></fieldset></dl></div>

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

            • <bdo id='U5YBo'></bdo><ul id='U5YBo'></ul>

                  <tbody id='U5YBo'></tbody>
                本文介绍了跟踪用户何时点击浏览器上的后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                是否可以检测到用户何时点击了浏览器的后退按钮?

                我有一个 Ajax 应用程序,如果我可以检测到用户何时点击了后退按钮,我就可以返回相应的数据

                任何使用 PHP、JavaScript 的解决方案都是首选.地狱任何语言的解决方案都很好,只需要我可以翻译成 PHP/JavaScript 的东西

                从下方剪切和粘贴:

                哇,所有优秀的答案.我想使用 Yahoo,但我已经在使用 Prototype 和 Scriptaculous 库并且不想添加更多的 ajax 库.但它使用了 iFrames,这给了我一个很好的指针来编写我自己的代码.

                解决方案

                有多种方法可以做到,但有些方法只能在某些浏览器中使用.我最清楚的是在页面上嵌入一个几乎不可见的微小 iframe.当用户点击后退按钮时,iframe 会向后导航,您可以检测并更新您的页面.这里是另一种解决方案.>

                您可能还想查看 Gmail 之类的源代码,看看他们是如何做到的.

                这里是 一个库,可以满足您的需求方式

                Is it possible to detect when the user clicks on the browser's back button?

                I have an Ajax application and if I can detect when the user clicks on the back button I can display the appropriate data back

                Any solution using PHP, JavaScript is preferable. Hell a solution in any language is fine, just need something that I can translate to PHP/JavaScript

                Edit: Cut and paste from below:

                Wow, all excellent answers. I'd like to use Yahoo but I already use Prototype and Scriptaculous libraries and don't want to add more ajax libraries. But it uses iFrames which gives me a good pointer to write my own code.

                解决方案

                There are multiple ways of doing it, though some will only work in certain browsers. One that I know off the top of my head is to embed a tiny near-invisible iframe on the page. When the user hits the back button the iframe is navigated back which you can detect and then update your page. Here is another solution.

                You might also want to go view source on something like gmail and see how they do it.

                Here's a library for the sort of thing you're looking for by the way

                这篇关于跟踪用户何时点击浏览器上的后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:PHP无头浏览器? 下一篇:我们如何在隐私浏览模式下打开链接

                相关文章

                最新文章

                <legend id='eZzA2'><style id='eZzA2'><dir id='eZzA2'><q id='eZzA2'></q></dir></style></legend>

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

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

                    • <bdo id='eZzA2'></bdo><ul id='eZzA2'></ul>