框架+ cols IE10 [英] Frameset + cols IE10

查看:116
本文介绍了框架+ cols IE10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在IE10中测试一些脚本,看来浏览器在设置属性cols时遇到问题.

I was testing some scripts in IE10, seems that the browser has problems in setting attribute cols.

示例:

parent.middle.document.getElementById("middle_frames").cols = "0,*"

此功能非常适合SAF/Chrome/FF/IE7/IE8/IE9,但在IE10中则无效.

This works perfect for SAF/Chrome/FF/IE7/IE8/IE9, but in IE10 it doesn't work.

有人需要帮助吗?

我无法在项目中显示问题,但我制作了一个虚拟脚本来向您显示问题. 制作3个文件(以下),然后在IE10中运行它们,然后单击更改列"按钮. 适用于除IE10以外的所有浏览器.在我的示例中,您看到我使用了doctype,也尝试了不使用doctype的问题,同样的问题.

I can't show my problem in my project, but I made a dummy script to show you the problem. Make 3 files (these below) and run them in IE10 and click the button "change cols". Works perfect for every browser except IE10. In my example you see I used a doctype, tried also without a doctype, same problem.

frameset_main.html:

frameset_main.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>Framesets</title>
    </head>
    <frameset id="framesets" cols="200,*" frameborder="0" border="0" framespacing="0">
        <frame src="frame1.html" name="frame1" id="frame1" scrolling="vertical" noresize="noresize">
        <frame src="frame2.html" name="frame2" id="frame2" scrolling="vertical" noresize="noresize">
    </frameset>
</html>

frame1.html:

frame1.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>Frame 1</title>
    </head>
    <body style="background-color: green;">
    </body>
</html>

frame2.html:

frame2.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>Frame 2</title>
        <!-- ONPAGE JAVASCRIPT -->  
        <script type="text/javascript">
        function dothis(){
            parent.document.getElementById("framesets").cols = "500,*";         
        }       
        </script>
    </head>
    <body style="background-color: red;">
    <div id="main_container" class="cls_main_container">
        <input type="button" id="btn_do_this" onclick="dothis();" value="change cols" />
    </div>
    </body>
</html>

推荐答案

对我来说,以下内容似乎有用(有点像Raads修复程序)

For me the following seems to work (Its somewhat like Raads fix)

parent.document.getElementById("framesets").cols="0,24%,*";
parent.document.getElementById("framesets").rows=parent.document.getElementById("framesets").rows;  //IE10 bug fix

这篇关于框架+ cols IE10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆