js去掉html标签

js去掉html标签

 

var contract_no=$("ap").find('contract_no').html();//合同号

var contract_no=delHtmlTag(contract_no);

 function delHtmlTag(contract_no){ 

        return contract_no.replace(/<[^>]+>/g,"");//去掉所有的html标记 

     }  

alert(contract_no);

因为数据库里面存的是

 

 

posted @ 2017-07-07 15:04  wuli梦梦  阅读(1069)  评论(0编辑  收藏  举报