下面的代码需要很长时间;
var table = new Array();
for(var i =0; i< dtObjects.Rows.length; i++)
{
for(var j=0; j< dtColumns.Rows.length; j++)
{
for(var k=0; k< dtTypes.Rows.length; k++)
{
if((dtObjects.Rows[i].Id == dtColumns.Rows[j].Id) && (dtColumns.Rows[j].xtype == dtTypes.Rows[k].xtype))
table.push({
TableName : dtObjects.Rows[i].Name,
Type: dtObjects.Rows[i].type,
ColumName: dtColumns.Rows[j].Name,
DataType: dtTypes.Rows[k].Name,
Length : dtColumns.Rows[j].Length
});
}
}
}
dtObjects.Rows.length = 900
dtColumns.Rows.length = 1500
dtTypes.Rows.length = 30
无论如何可以在几秒钟内实现(过滤)这个?