读书人

document.getElementById(quot;DataGrid1quot;

发布时间: 2013-12-28 22:19:33 作者: rapoo

document.getElementById("DataGrid1").all;在谷歌中兼容性问题,顶者有分
document.getElementById(
如图所示,var links = document.getElementById("DataGrid1").all;在IE下得到值没问题,谷歌中不行,查了查说all不兼容,不用all该用什么呢,用children、rows试了试也都不行,要遍历datadrid每行信息,应该怎么写
[解决办法]

引用:
alert( $('#DataGrid1').length);
这个返回值是1,我要得到所有行,应该怎么写

不需要获取长度

$("[id=DataGrid1]").each(function(){
//处理
})

读书人网 >JavaScript

热点推荐