如何检测用户是否在历史堆栈的最后一页 [英] how to detect if user is at the last page of the history stack

查看:71
本文介绍了如何检测用户是否在历史堆栈的最后一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户点击返回我的网站时,我希望它运行一个javascript

功能。


可以检测FORWARD按钮的时间是灰色的吗?


Herc

-

我打电话给这个很难看,我很自豪 www.supernerd.com.au/~gray77/kath1.jpg

解决方案

| - | erc在用户点击后的8/21/2005 10:10 PM说:

要访问我的网站,我希望它能运行一个javascript
函数。

你能看到FORWARD按钮何时显示为灰色?




不。我来自哪里或我去的地方都不是你的业务。


此外,它有什么区别?


-

兰迪

comp.lang.javascript常见问题 - http://jibbering.com / faq &每周新闻组


" Randy Webb" <您好************ @ aol.com>写道...

| - | erc在8/21/2005 10:10 PM说:

当用户点击返回我的网站时,我想让它运行一个javascript
函数。

你能看到FORWARD按钮何时显示为灰色?



没有。我来自哪里或我要去的地方。

此外,它有什么区别?




windows.history.length将告诉我你的队列中有多少个网站,所以

你错了。


FORM --- submit --->第2页[单击返回编辑]


当您单击返回(从我自己的页面再次)时,表单数据仍然存在

并且您可以编辑它。但javascript变量被重置,所以我需要

使用表格中的数据重新初始化它们。


Herc


| - | erc写道:

当用户点击返回我的网站时,我希望它运行一个javascript
功能。

你能看到FORWARD按钮何时显示为灰色?




看到有些浏览器缓存了DOM而其他浏览器没有,我怀疑是否有任何

一般解决方案甚至是可能的。


-

John W. Kennedy

绝不试图采取如果你不确定你的领导人是不是异装癖,那么基于激进的女性主义议程的国际经济就会超过国际经济。

- David Misch: She-Spies,当你出去的时候


when a user clicks back to get to my site, I want it to run a javascript
function.

can you detect when the FORWARD button is greyed out?

Herc
--
I call3d this fugly and I''m proud www.supernerd.com.au/~gray77/kath1.jpg

解决方案

|-|erc said the following on 8/21/2005 10:10 PM:

when a user clicks back to get to my site, I want it to run a javascript
function.

can you detect when the FORWARD button is greyed out?



No. It is none of your business where I came from or where I am going.

Besides, what difference does it make?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


"Randy Webb" <Hi************@aol.com> wrote in ...

|-|erc said the following on 8/21/2005 10:10 PM:

when a user clicks back to get to my site, I want it to run a javascript
function.

can you detect when the FORWARD button is greyed out?



No. It is none of your business where I came from or where I am going.

Besides, what difference does it make?



windows.history.length will tell me how many sites are in your queue, so
you are wrong.

FORM --- submit ---> PAGE 2 [click Back to edit]

When you click back (from my own page again), the form data is still there
and you can edit it. But the javascript variables are reset so I need to
reinitialise them using data from the form.

Herc


|-|erc wrote:

when a user clicks back to get to my site, I want it to run a javascript
function.

can you detect when the FORWARD button is greyed out?



Seeing that some browsers cache the DOM and others do not, I doubt any
general solution is even possible.

--
John W. Kennedy
"Never try to take over the international economy based on a radical
feminist agenda if you''re not sure your leader isn''t a transvestite."
-- David Misch: "She-Spies", "While You Were Out"


这篇关于如何检测用户是否在历史堆栈的最后一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆