replaceWith() 方法将选择的元素的内容替换为其他内容
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="http://www.51texiao.cn/" />
<title>无标题</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").replaceWith("<b>hello</b>");
//将p元素里面的内容替换为"<b>hello</b>"
});
});
</script>
</head>
<body>
<p>1111111111111111111111</p>
<button>click</button>
</body>
</body>
</html>