开发者

html frames problem

I have used html frames to create a page. It has 3 frames linked with 3 different pages. Now in one frame there is a logout option. When i press that button it only changes in that frame. I want that when i logout, all the other frames must be removed a开发者_运维技巧nd just a single page. Please tell me if there is a way..


You could give the logout link target="_top":

<a href="logout.html" target="_top">

that will destroy the frameset, and redirect the user to the logout page in the full window.


On the logout success page, put this javascript in the head tags:


   if (top.location!= self.location) {

   top.location = self.location.href

        }


set the target of your logout-form (or link, depending on what you're using) to _top. for more information, take a look at this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜