1 回答
已采纳

轻键快码
TA贡献5条经验 获得超2个赞
语法:
element.removeAttribute(attrName);
例:
<h1 id='title' style='color:blue;'>title</h1> document.getElementById('title').removeAttribute('style'); <h1 id='title'>title</h1>
添加回答
举报
0/150
提交
取消