获得DataGrid行1列2的值
o = document.getElementById("DataGrid1");
document.getElementById("Text1").value=o.rows[1].cells[2].innerText;
document.getElementById("Text2").value=o.rows[1].cells[2].innerText;
出错提示:Microsoft JScript 运行时错误: 'o.rows.1.cells.2.innerText' 为空或不是对象还有怎样知道Cells为2值为“ZYC”的在哪一Rows谢谢
o = document.getElementById("DataGrid1");
document.getElementById("Text1").value=o.rows[1].cells[2].innerText;
document.getElementById("Text2").value=o.rows[1].cells[2].innerText;
出错提示:Microsoft JScript 运行时错误: 'o.rows.1.cells.2.innerText' 为空或不是对象还有怎样知道Cells为2值为“ZYC”的在哪一Rows谢谢
换一个角度想想你不就是想将DataGrid行1列2的值让js获取吗?
何不在服务段先获取它的值让后
Response.Write("<script>var i = \""+yourdata+"\";</script>");
i就是你想要的。