本文介绍了大的HTML表格很慢吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近正在开发一个使用大量(数百)行的表的应用程序。这些行包含表格数据,每行包含两个下拉列表以及显示其下方直接隐藏的表格行的链接。

I've recently been developing an application using tables with a large number (hundreds) of rows. The rows contain tabular data and each row contains two drop down lists as well as link which displays hidden table rows directly below it.

我尝试

表格是我问题的根源吗?

Is the table the source of my problem here?

推荐答案

从我收集的内容来看,如果宽度没有明确说明,HTML表格可能会显得很慢。如果不是,浏览器必须先完成单元格内容的加载,然后才能计算出正确的宽度。
MSDN有一些信息关于他们的文章可能有所帮助;他们建议如下(特别是关于表):

From what I gather, HTML tables can be appear to be slow to render if widths are not explicitly stated. If they aren't, the browser has to finish loading the contents of the cells before it can calculate the correct widths.

MSDN has some information here on their "Building High Performance HTML Pages" article that may help; they suggest the following (regarding tables specifically):

这篇关于大的HTML表格很慢吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 14:52