屌丝变土豪
<h3>使用replaceAll()方法替换元素内容</h3>
<span class="green" title="hi">我是屌丝</span>
<input type="submit" id="btn1" value="屌丝变土豪请点我">
<script type="text/javascript">
$(function(){
var $html = "<span class='red' title='hi'>我是土豪</span>";
$("#btn1").click(function(){
$($html).replaceAll(".green");
})
})