小弟又有一问题,关于事件的
我用JAVASCRIPT动态生成一个表格,如下:
var table;
var cell = null;
var row = null;
//easyLayer 是层的ID
table = createTable("table",easyLayer);
this.table = table;
table.cellSpacing = 1;
table.cellPadding = 1;
thead = createTable("thead", table);
for (var i=0;i<count;i++){
row = createTable("tr", thead);
cell = createTable("td", row);
cell.appendChild(document.createTextNode("SSS"));
}
function createTable (type, parent) {
var el = null;
el = document.createElement(type);
if (typeof parent != "undefined") {
parent.appendChild(el);
}
return el;
}
我想在cell上加事件,取出对应值,比如"SSS";
问题点数:0、回复次数:2Top
1 楼zshui(流浪的人)回复于 2003-09-04 10:50:08 得分 0
我在循环里面
//cell.attachEvent("onMouseDown",handleClick);
不能调用这个函数handleClick;Top
2 楼cloudchen(cloudchen)回复于 2003-09-04 12:15:12 得分 0
onmousedown
小写Top




