Internet Explorer 9 无法正确呈现表格单元格 [英] Internet Explorer 9 not rendering table cells properly

查看:31
本文介绍了Internet Explorer 9 无法正确呈现表格单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站在 IE8、IE7、FF、Chrome 和 Safari 上一直运行流畅.现在我正在 IE9 上测试它,但我遇到了一个奇怪的问题:在某些页面中,某些表格数据呈现不正确.

My website has always run smoothly with IE8, IE7, FF, Chrome and Safari. Now I'm testing it on IE9 and I'm experiencing a strange problem: in some pages, some tabular data renders incorrectly.

HTML 源代码完全正确,每次刷新页面时给出问题的行都会发生变化(说实话,问题本身只出现在某些刷新中,而不是全部).

The HTML source is correct and all, and the row giving the problem changes every time I refresh the page (to tell the truth, the problem itself appears only in some refresh, not all).

使用IE的F12工具,表结构正确,包含M08000007448的TD后面应该没有空的TD,但还是这样渲染.

Using the F12 Tool of IE, the table structure appears correct, there should be no empty TD after the TD containing M08000007448, but still it renders like this.

此外,如果我使用 F12 工具,在工具栏中使用通过单击选择元素"工具,并尝试单击 M08000007448 和 19 之间的空白区域,它会选择 TR,而不是隐藏的 td".

Moreover, if I use the F12 tool, with "select element by click" tool in the toolbar, and I try to click on the empty space between M08000007448 and 19 , it selects the TR, not a "hidden td".

我在应用程序的其他一些表中也遇到了这个表呈现问题,有人遇到过这样的事情吗?它只发生在 IE9 中 :(

I'm having this table rendering problem also in some other table in the application, anyone experiencing something like this? It happens only in IE9 :(

我不知道这是否重要,但页面是用 ASPNET(网络表单)制作的,并使用了 Jquery 和其他一些 JS 插件.

I don't know if it's important, but the page is made with ASPNET (webforms) and use Jquery and some other JS plugin.

我尝试保存页面(带图像)并使用 IE9 在本地打开它,但问题从未发生.(当然,我检查了所有表结构,没问题.标题和所有行都具有相同数量的 TD,必要时使用正确数量的 colspan).

I tried to save the page (with images) and open it in local with IE9, but the problem never occurs. (Of course I checked all the table structure and it's ok. Header and all rows have the eact same number of TD's, with the right number of colspan when necessary).

推荐答案

我有同样的问题.您可能想阅读此 https://connect.microsoft.com/IE/feedback/details/649949/innerhtml-formatting-issues-on-very-large-tables

I have exactly the same problem as well. you may want to read this https://connect.microsoft.com/IE/feedback/details/649949/innerhtml-formatting-issues-on-very-large-tables

如果您的 html 是从 ajax 返回的,您可以使用 javascript 删除 td 之间的空格,然后从响应中将其替换为

YOu can remove the space inbetween td by using javascript if your html is returned from ajax, then from the response, you replace it with

response_html = response_html.replace(/td>s+<td/g,'td><td');
$('#table').html(response_html);

这篇关于Internet Explorer 9 无法正确呈现表格单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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