如何在javascript中设置td中某个值的id
问题描述:
我在javascript中创建td我想要的是这个< td id ='abc'>
如何在javascript中设置td id我使用 setAtteribute()无法正常工作
i m creating td in javascript what i want is this "<td id='abc'>"
how can i set the td id in javascript i use setAtteribute()
not working
我的代码看起来像这样
var cell4 = row.insertCell(3);
cell4.innerHTML = "Song";
var cell5 = row.insertCell(4);
cell5.setAttribute('id','example1');
我想设置td的id值示例
plz help
i want to set id of the td with value example plz help
答
cell5.id ='example1'; // javascript
cell5.id = 'example1'; // javascript
我想我们在这里谈论IE?我不知道id,但是..
I suppose we're talking about IE here? I don't know about "id", but..
http://webbugtrack.blogspot.com/2007/08/bug-242-setattribute-doesnt-always-work.html