如何从数据变量中的html中删除style =“”?
<span>
<a href="#/posts/{{$index|angular}}">Comments</a>
</span>
答案 0 :(得分:1)
你应该通过克隆 var $clone = $('.fc-content').clone(); // Clone the element
$clone.find("[style]") // Find the elements with style attributes
.removeAttr("style") // Remove the attribute entirely
var data = .html(); // Now grab the clone's HTML
来做到这一点 - 这样你就可以使用jQuery来执行操作:
<div id="demo"></div>