使用jQuery删除内联样式 [英] Use jQuery to remove an inline style
本文介绍了使用jQuery删除内联样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<div class="mydiv">
<ul style="height:111px; width:222px;">
...
有可能使用jQuery高度属性?请注意,有几个.mydiv ul的实例有不同的高度。
Is it possible with jQuery (or plain javascript) to remove just the height attribute? Note that there are several instances of .mydiv ul with varying heights.
推荐答案
要删除属性, >
To remove an attribute, use this:
$(".mydiv UL").css("height", "");
感谢我不是我纠正我的回答。
这篇关于使用jQuery删除内联样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文