.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);
}
技术文档
浙公网安备 33010602011771号