惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
H
Heimdal Security Blog
K
Kaspersky official blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Schneier on Security
G
GRAHAM CLULEY
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
Google DeepMind News
Google DeepMind News
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
阮一峰的网络日志
阮一峰的网络日志
Simon Willison's Weblog
Simon Willison's Weblog
C
Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
Security Archives - TechRepublic
Security Archives - TechRepublic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V
Visual Studio Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Jina AI
Jina AI
P
Proofpoint News Feed
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog
IT之家
IT之家
S
Security Affairs
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
N
News | PayPal Newsroom
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
NISL@THU
NISL@THU

博客园 - KenBlove

错误代码:0x800706BE 解决方法 泛微OA服务器更改IP地址后EMobile出现“调用远端服务器接口时发生错误(122)”的提示 HTTP 错误 404 - 文件或目录未找到 HTTP 错误 401.2 - 未经授权:访问由于服务器配置被拒绝。 优雅还不够,简洁才高效!——用NValidator一句话搞定客户端检测 MyXls初级教程 一个仿PetShop的通用DBHelper类 纯CSS实现底部固定漂浮导航 Access和SQL server开启表间关系,并实现更新或删除母表数据自动更新或删除子表数据 来自微软关于异常处理的17条军规 一个简单的拖动层(兼容IE,FF) SQL Server Profiler过滤本机信息的办法 "The state information is invalid for this page and might be corrupted"错误的一个解决办法 SQL回滚Transaction来调试SQL语句 SQL找出和删除一个表的重复记录 SQL常用判断检测语句 SQL把ID相同的记录合并成同一条记录 从丑陋到优雅,让代码越变越美续集之服务器端数据校验 关于FireFox记住密码后出现的bug 从丑陋到优雅,让代码越变越美(客户端检测方法思考)
关于Iframe在IE6下不显示的bug
KenBlove · 2009-03-24 · via 博客园 - KenBlove

IE都出到IE8了,用IE6的人渐渐少了..但还是存在的.例如QAMM们在用.

所以,IE6下存在的问题也必须解决.这两天,我就遇到一个了:

html
<table>
    
<tr>
        
<td id="tdTest" runat="server">
            
<iframe id="ifrTest" height="100%" runat="server"></iframe>
        
</td>
    
</tr>
</table>

Code
    protected void Page_Load(object sender, EventArgs e)
    {
        
this.ifrTest.Attributes.Add("src""ie6.aspx");
    }

很简单的代码,就是嵌套一个Iframe,后台绑定Iframe显示页面内容,简单得很呢.可是,这么简单的代码在IE6下就死活不显示!!

为什么呢?问题就出现在那个height="100%"上了,在IE6下height不知是取不到还是取到td原来那个未给src赋值之前的0.反正就死活不显示.

知道是这个问题,就简单了..解决办法有N种:

1.去掉height="100%",不过不设置高度iframe显示不如人意.

2.后台给td或者iframe设置一个固定值:

Code2
this.tdTest.Height = "200px";

3.前台动态设置iframe的height:

Code3
this.ifrTest.Attributes.Add("onload""iframeAutoHeight(this)");

前台还得加上:(以下这段js来自网络)

script
function iframeAutoHeight(obj)
{
    
var id = obj.id;
    
var subWeb = document.frames ? document.frames[id].document : obj.contentDocument;   
    
if(obj != null && subWeb != null)
    {
        obj.height 
= subWeb.body.scrollHeight;
    }   
}   

4.自己想吧....

另外,网络上有说IE6下scr属性排在第一位就不能显示,但是我死活尝试不出来.如果谁知道,欢迎指教:kenblove#gmail.com