Internet Explorer 9的不渲染表格单元格正确 [英] Internet Explorer 9 not rendering table cells properly

查看:273
本文介绍了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(Web表单)制成,使用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打开它,但从来没有出现问题。 (当然,我检查所有的表结构和它的确定。页眉和所有行具有EACT相同数量的TD的,具有在必要时合并单元格的右边数)。

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).

推荐答案

我有完全同样的问题为好。您可能需要阅读本<一个href=\"https://connect.microsoft.com/IE/feedback/details/649949/innerhtml-formatting-issues-on-very-large-tables\">https://connect.microsoft.com/IE/feedback/details/649949/innerhtml-formatting-issues-on-very-large-tables

您可以通过使用JavaScript,如果你的HTML是从阿贾克斯返回从响应除去其间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天全站免登陆