当前位置: 代码迷 >> ASP.NET >> jquery移除CSS样式有关问题
  详细解决方案

jquery移除CSS样式有关问题

热度:4335   发布时间:2013-02-25 00:00:00.0
jquery移除CSS样式问题
请教如何用jquery去掉下面代码里最里面一个span的style属性 
<div id=msg5 > 
<table ><tr><td> 
<span Class=syzx>a href=/Class/Show.asp?ID=341><span style='color:#000080;background:#800080'>士大夫士大夫士大夫</span></a></span></td></tr></table> 
</div>

------解决方案--------------------------------------------------------
document.getElementById("msg5").getElementsByTag("span")[1].style = "";
jquery不懂
------解决方案--------------------------------------------------------
$(".syzx > span").attr('{"style":""}');
这样看行不?
------解决方案--------------------------------------------------------
一句搞定的:)
JScript code
$('#msg5').find("span").find("span").removeAttr("style");
  相关解决方案