.NET中过滤TextBox中输入的html标签

前台过滤方法

function stripHTML(html)  
       {  
           return html=html.replace(/<[^>]*>/g, "");  
       }  
//调用stripHTML过滤html标签,然后赋值当前TextBox即可  
       function returnResult() {  
           document.getElementById("txtRemarks").value = stripHTML(document.getElementById("txtRemarks").innerHTML);   
       }  

  

技术文档
原文地址:https://www.cnblogs.com/ishibin/p/2792264.html