标签:[1] des length cli tns detail var alert 取值
function Test() {
var rows = document.getElementById("tbDetail").rows;
if (rows.length > 0) {
for (var i = 1; i < rows.length; i++) {
(function (i) {
//var temp = rows[i].cells[0].childNodes[1].value;
var temp = rows[i].cells[0].childNodes[0].data;
for (var j = 0; j < rows[i].cells.length; j++) {
(function (i, j) {
var temp2 = rows[i].cells[j].childNodes[0].data;
var temp3 = rows[0].cells[j].childNodes[0].data;
var obj = rows[i].cells[j];
//obj.ondblclick = function () { alert(temp + "::" + temp2); };
obj.onclick = function () { btnShow(temp, temp2, temp3) };
})(i,j)
}
})(i)
}
}
}
<table id="tbDetail">
<tr><tb></tb></tr>
</table>
标签:[1] des length cli tns detail var alert 取值
原文地址:http://www.cnblogs.com/yangpeng-jingjing/p/6306173.html