作者fumizuki (蒙面加菲狮)
看板Visual_Basic
标题[资讯] IE10 bug
时间Sat May 4 11:07:32 2013
1. 使用框架(frameset)显示多重文件格式(DOCTYPE),
在IE10标准模式下可能会显示空白画面
<!-- main.html -->
<!DOCTYPE html>
<html>
<head>
<meta content="IE=5" http-equiv="X-UA-Compatible" />
</head>
<frameset id="mainframe" rows="2" cols="217,*" bordercolor="#C0C0C0"
frameborder="no">
<frame name="left" src="menu.html" marginwidth="0" marginheight="0"
scrolling="Auto" frameborder="no" noresize>
<frame name="right" src="page1.html" marginwidth="0" marginheight="0"
scrolling="auto" frameborder="no">
</frameset>
</html>
<!-- menu.html -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
</head>
<body>
<table>
<tr>
<td><a href="page1.html" target="right">HTML5</a></td>
</tr>
<tr>
<td><a href="page2.html" target="right">HTML4</a></td>
</tr>
</table>
</body>
</html>
<!-- page1.html -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
</head>
<body>
IE10 开发者工具中会显示浏览器模式为 IE10,文件模式为 IE5 Quirks<br />
</body>
</html>
<!-- page2.html -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
</head>
<body>
IE10 开发者工具中会显示浏览器模式为 IE10,文件模式为 IE5 Quirks
在左侧点选功能选单开启此页面,会看到空白画面
使用开发者工具中的网路页签追纵,
IE 是有向 Web Server 送出 GET 要求此页面的,但就是看不到结果
按下 <b>Alt</b> 键显示 IE 功能表列时同时也会显示此页面
如果使用者一开始就切换浏览器模式到 Internet Explorer 10 相容性检视,就一切正常
</body>
</html>
解决方法1:不要混合着多种文件格式,全部改为HTML5设计,或全部改为HTML4设计
解决方法2:要求使用者自行切换至相容性检视再开始浏览网页
2. 网页中的表格(TABLE)元素有合并列及合并栏,列印时画面超过一页时
合并列以前的所有框线都会消失
(IE8, IE9, IE10 都有这个问题)
案例:
ASP.NET 中使用 GridView 产生表格,
并在 GridView.DataBound 事件中额外加入一列有合并列的标题
类似下图所示:
┌──┬─────┬──┬
│标题│ 标题 │标题│...
│ ├──┬──┤ │
│ │标题│标题│ │
├──┼──┼──┼──┼
│资料│资料│资料│资料│
├──┼──┼──┼──┼
│资料│资料│资料│资料│
├──┼──┼──┼──┼
解决方法:
有合并列的表格不要跨页
→GridView设定不显示标题列,并且在GridView之前另外设计一个只有标题列的表格
(但是表格的每一个栏位都需要指定宽度,否则可能会标题列和资料列不同宽度)
google 搜寻到的相关讨论如下:
http://stackoverflow.com/questions/13750134/ie-10-missing-border-segments-while-printing-table-elements
https://connect.microsoft.com/IE/feedback/details/776830/borders-missing-when-printing-in-standards-mode
https://connect.microsoft.com/IE/feedback/details/771188/tables-printing-problem-in-ie10
--
▃▅▇▆▄ ▆▂▃ `
逝去感情如何能留住,半点痴情遗留殊不易,██▅▇▄▃ ▇▃▂" .
█████████▃i ▁▄▇
更多凄凄惨惨的遭遇…………██▆▃ █▅▆▃ˍ▄*
◢ ▂█▄▇▅▂▌.
我不知道,王~八~蛋~~! ▂▆███ █▄▃ 。fumizuki。Check。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.194.229.179
1F:→ MOONRAKER:IE10看来是要大家抛弃frameset又抛弃table就对了 :P 05/04 13:06
2F:→ fumizuki:补充,相容性检视还不够,还要文件模式改为IE5 Quirks 05/06 23:23