<div >test</div>

 

var htmlElement = $("div1").prop("outerHTML");// 获得指定元素包括本身

 

结果:htmlElement = <div >test</div>

相关文章: