<table id='tb'>
<tr>
<td id='tds'></td>
<td id='tds'></td>
<td></td>
<td></td>
</tr>
</table>
id已经改不了了
代码类似上面这样,然后我只想改变id名字为‘tds’的单元格的宽度。然后我用了
$('#tb #tds').each(function(){
$(this).css('width','1000px');
);
});
这个方法 可是只能改变第一个td的宽度啊 救命啊 实际问题还有很多但是不能改ID了 怎么办怎么办???求高手。
然后$('#tb .tds').each(function(){
$('#tb td[id]').css('width','1000px')或者$('#tb td[id=tds]').css('width','1000px')
页面上不要有重复的id