字符串中是否含有html标签

181 阅读1分钟
function checkHtml(htmlStr) { var reg = /<[^>]+>/g; return reg.test(htmlStr); }