jQuery移除style指定的CSS样式
what
想要移除写在style指定的css样式,⽹上了很多⽅法,貌似都移除不了,其实可以巧妙的通过空字符就可做到how
jquery的attr属性
修改前属性内容:
<dl id="longporo" >
移除width属性JS代码:
$("#longporo").css("width","");
修改后属性内容:
<dl id="longporo" >
ps:如果要移除style的所有属性可以直接:
$("#longporo").removeAttr("style","");