Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$("td").className='';
尝试做这样的事情,它使所有<TD>元素成为请求的 css 类。我什至不知道这是否是正确的方法。
<TD>
你想使用addClass():
addClass()
$('td').addClass('yourClassName');
或者你可以使用attr().
attr()
$('td').attr('class', 'className');