87,910
社区成员
发帖
与我相关
我的任务
分享
window.onload = function() {
var tds = document.getElementById("tb1").getElementsByTagName("td");
for (var i = 0, len = tds.length; i < len; i++) {
tds[i].onclick = function(e) {
/*
e = e || window.event;
var t = e.target || e.srcElement;
if (t.tagName.toLowerCase() == "td") {
var img = document.createElement("IMG");
img.src = "http://www.google.com/intl/en_ALL/images/logo.gif";
t.appendChild(img);
}
*/
var img = document.createElement("IMG");
img.src = "http://www.google.com/intl/en_ALL/images/logo.gif";
this.appendChild(img);
}
}
}