假如我们有这个一个页面,  index.html



 
  <br>  <body><br>  <p>This page uses frames, but your browser doesn&apost support them.</p><br>  </body><br> 

Toc.html是目录页面, Content.html是内容页面。     

场景1:假如一个用户登入后, 进入index.html,然后用户过了很长一段时间没有操作session timeout了。这时候用户再去点页面的操作的话,这时候Content.html会转到登入页面, 但是因为在一个frame里面, 所以登入页面会在index.html中。我们希望他不出现在index.html中, 清在登入页面加上下面这段javascript


场景2:我们希望右边的内容页面不能独立的出现(即一定要出现在index.html中),我们也需要在每个在“main” frame的页面加上下面这段javascript
if (window.top == self){
    // ensure sub page would contain in index page
    window.location="index.html";
}
评论
发表评论

您还没有登录,请登录后发表评论

dengyin2000
搜索本博客
我的相册
4d063000-8eef-365d-8346-f210ccfd5265-thumb
VB-seamless
共 13 张
存档
最新评论