iframe中在父窗口打开子页面
我们在做页面框架的时候,通常会采用一个iframe来显示子页面,但有这么种情况,就是session失效时,登录页面就会显示在iframe中,这不符合常理,一般应该显示在顶部才对。
下面的js代码可以解决上述问题,只需要在登录页面添加如下代码:
<script type="text/javascript" >
/**有父窗口则在父窗口打开*/
if(self!=top){top.location=self.location;}
</script>
转自:http://liuna718-163-com.iteye.com/blog/1464168
iframe中在父窗口打开子页面的更多相关文章
- HTML 父窗口打开子窗口,并从子窗口返回值
父窗口:windowdemo.html <html> <head> <title> 接收子窗口返回的内容 </title> <script lan ...
- Js/Jquery获取iframe中的元素 在Iframe中获取父窗体的元素方法
在web开发中,经常会用到iframe,难免会碰到需要在父窗口中使用iframe中的元素.或者在iframe框架中使用父窗口的元素 js 在父窗口中获取iframe中的元素 1. 格式:window ...
- HTML中IFrame父窗口与子窗口相互操作
一.Iframe篇 //&&&&&&&&&&&&&&&&&&am ...
- JavaScript(Iframe、window.open、window.showModalDialog)父窗口与子窗口之间的操作
一.Iframe 篇 公共部分 //父对象得到子窗口的值 //ObjectID是窗口标识,ContentID是元素ID function GetValue(ObjectID,ContentID) { ...
- 总结JavaScript(Iframe、window.open、window.showModalDialog)父窗口与子窗口之间的操作
一.Iframe 篇 //&&&&&&&&&&&&&&&&&&a ...
- 总结js(Iframe、window.open、window.showModalDialog)父窗口与子窗口之间的操作
http://hi.baidu.com/yashua839/blog/item/131fdb2fe547ef221f3089af.html一.Iframe 篇 //&&&&am ...
- iframe父窗口和子窗口之间的调用
1>父窗口获取子窗口 js方法 document.getElementById('if1').contentWindow.document: window.frames["if1&qu ...
- 在js中实现新窗口打开页面
我们都知道可以在html代码中使用<a href="xxxx" target="_blank"></a>这种方式来打开一个新的窗口打开一 ...
- iframe父窗口和子窗口的调用方法
iframe 父窗口和子窗口的调用方法父窗口调用子窗口 iframe_name.iframe_document_object.object_attribute = attribute_value 例子 ...
随机推荐
- java多线程编程(2)交替输出数字和字母
mark一下,不停的看看notify和wait的没有理解 class Printer { int index=0; //输出奇数 public synchronized void printA(int ...
- UVa 3704 Cellular Automaton(矩乘)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=15129 [思路] 矩阵乘法-循环矩阵 题目中的转移矩阵是一个循环矩 ...
- Java正则表达式(1)
String类的三个内建正则表达式工具: 1.matches()方法 示例:检查一个句子是否以大写字母开头,以句号结尾 public static boolean checkFormat(String ...
- 《图解密码技术》-chaper1-概述
密码和信息安全常识: (1)不要使用保密的密码算法. (2)不要使用低强度密码算法. (3)密码一定会被破解. (4)密码只是信息安全的一部分.
- hdu 4474 大整数取模+bfs
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4474 (a*10+b)%c = ((a%c)*10+b%c)%c; 然后从高位开始枚举能填的数字填充, ...
- zabbix web场景模拟监控配置
一,zabbix2.2.3 VMware Vsphere exsi监控配置步骤, 1,添加监控主机 2,添加聚集macro;{$PASSWORD} = yoodo.com{$URL} = http:/ ...
- 爬虫技术浅析 | z7y Blog
爬虫技术浅析 | z7y Blog 爬虫技术浅析
- hdu 2066 一个人的旅行(最短路问题)
最短路································· 类似的问题还有好多不会!慢慢学吧!!!!. 进步,哪怕每天一点也行! (恋爱不是小事,确实小事的积累!(听着酷狗音乐台说的,很 ...
- dom4j的基本操作
/** * 建立一个XML文档,文档名由输入属性决定 * @param filename 需建立的文件名 * @return 返回操作结果, 0表失败, 1表成功 */ import java.io. ...
- 在LINUX中跟踪函数调用----http://stackoverflow.com/
http://stackoverflow.com/questions/311840/tool-to-trace-local-function-calls-in-linux I am looking f ...