日期:2014-05-16  浏览次数:20311 次

怎么动态的在表格行或是单元各中加入时间呢?
function   biaoge(ck,ck2)
{
row1=td.insertRow();//插入行
row1.title= "双击删除此数据 ";
row1.ondblclick= "shanchu2() ";
cell1   =   row1.insertCell();     //从行中插入列   ,第一列
cell2   =   row1.insertCell();     //从行中插入列   ,第二列
cell1.innerHTML   =ck;   //插入内容
cell1.style.textAlign   = "center ";//居中
cell2.innerHTML   =ck2;   //插入内容
cell2.style.textAlign   = "center ";//居中
}
< < < < <row1.ondblclick= "shanchu2() ";怎么就不起作用呢?> > > > >

------解决方案--------------------
row1.ondblclick=shanchu2;
------解决方案--------------------
row1.ondblclick= "shanchu2() ";

================================
row1.ondblclick = function(){shanchu2();};
------解决方案--------------------
row1.ondblclick= "shanchu2() ";
改成:
row1.attachEvent( "ondblclick ",shanchu2)