删除内部html元素并仅返回文本的最简单方法是JQuery .text()函数。例:var text = $('<p>A nice house was found in <b>Toronto</b></p>');alert( text.html() );//Outputs A nice house was found in <b>Toronto</b>alert( text.text() );////Outputs A nice house was found in TorontojsFiddle演示