English 中文(简体)
j印[复制]
原标题:Back button disable issues in javascript [duplicate]
This question already has answers here:
Closed 11 years ago.

Possible Duplicate:
Disable browser s back button
Prevent user from going back to the previous secured page after logout

我正在开发一个在线课程登记门户,用户在成功登录后将转往他的主页。 在其主页上有一个超文本链接,用于登录,用户点击该服务器,使会议无效,并转往门户主页。 在门户主页上,一使用《html法典》头部以下文字:

<script>
    window.history.forward(1);
</script>

在《html法典》的正文部分,我正在使用这一方法。

<body onunload="javascript:history.go(1)">

但是,问题在于,在离去之后,背纽芬兰仍然把我转移到用户的主页上。 但此后,当我点击背顿时,它仍留在用户的主页上。 但我想将其限制在门户网站主页上。

问题回答

页: 1 实际上,我只想在用户对背顿点进行点击之后,把电子邮件等功能转移到同一页上。

如果是大家想要的话,那么我认为你需要做的是,

  1. Have the page contain a call to the server for "update".
  2. Validate the session. This will fail.
  3. Do a redirect.




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签