http://www.javaeye.com/topic/145818
用户登陆的校验是放到一个servlet里面的,项目用到frame,所以地址栏的地址一直是这个servlet的地址。当点击退出以后,我把程序转向登
陆页。但是地址栏是没有变化的,在次刷新又进去系统了。这个问题我实在不清楚应该怎么弄了,我想改变地址栏的地址,http://localhost:
8080/webGUI/forwardCnm
但是无论是转发,重定向,还是js的location地址栏始终没有变化。就在这个地址栏上刷新还能得到用户名和密码。实在是搞不清楚怎么回事了,望有精验的前辈给个解决方案!
发表时间:2007-12-11
window.location.href |
|
返回顶楼 | |
发表时间:2007-12-11
codeutil 的几句话让我解决了这个一直想不通的问题。谢谢! |
|
返回顶楼 | |
发表时间:2007-12-22
codeutil的方法是正解。 引用
If the page is the only page being displayed, top, parent, self and window will be equal. If the page is being held within a frameset, self and top will not be equal. If the page is the page containing the frameset, and it itself is not being held within a frameset, self and top will be equal. If someone is loading your page into their frameset and you don't want them to, you can use the self-top relationship to remove your page from their frameset and replace their frameset page with your page using:
Note, I could have used this:
However, that makes the browser add the new entry into its history, |