$('<p>'+data+'</p>').text()
//测试 var data = '<div>sdfdfwere<sdf><dfd>sfdsf</div>'; alert($('<p>'+data+'</p>').text());