Jquery去除从数据库中查询到的内容含有的p标签

$("#topic_content").html($("#topic_content").text());

 

如果这个数据是通过循环遍历出的数据,就需要下面这个代码了。

1 $(".search_result_content").each(function(index,obj){
2                 var e_obj=$(obj)
3                 e_obj.html(e_obj.text());
4                 
5                 });

 

posted @ 2014-03-29 20:11  来福1990627  阅读(958)  评论(0编辑  收藏  举报