开发者

IE8 crashes on hiding table column that intersects a rowspan

开发者 https://www.devze.com 2023-01-03 06:16 出处:网络
IE 8 crashes with the following javascript but the same code works fine in IE6, IE7, IE8(IE7mode), FF3, Chrome and Safari.Has anyone run into this? Any known workarounds?

IE 8 crashes with the following javascript but the same code works fine in IE6, IE7, IE8(IE7mode), FF3, Chrome and Safari. Has anyone run into this? Any known workarounds?

Thanks in advance, -dk

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
function HideColumn(){
    document.getElementById('hide1').style.display = 'none';
}
</script>    
</head>
<body>
<button onClick="HideColumn();">Hide 开发者_JAVA技巧Column</button>
<table class="grid" border="1" width="300">
    <tbody>
        <tr>
            <td>A1</td>
            <td id="hide1" rowspan="3" style='background:silver'>HIDE ME!</td>
            <td>C1</td>
        </tr>
        <tr>
            <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
            <td>A3</td>
            <td>C3</td>
        </tr>
    </tbody>
</table>
</body>
</html>


consider forcing ie7 mode. Check out this url: http://blog.timwarr.net/2008/09/29/forcing-compatibility-mode-in-ie8-when-users-view-you-page/


See solution here: Solution Here is about a rows, but the same problem with cells. I believe that "grid" class in your example has border-collapse value.

0

精彩评论

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