js及jQuery移除html元素所有的class

来源:互联网 发布:剑三儒风盾太数据 编辑:程序博客网 时间:2024/05/17 04:59
1.比较正式的写法(jQuery)
2.其它写法(jQuery)
1
$('').removeAttr('class');
2
$('').attr('class','');
3
$('')[0].className = '';
3.如果没有使用jQuery的话
1
document.getElementById('').className = '';
阅读全文
0 0
原创粉丝点击