qichunren 发表于 2013-2-7 18:33:19

javascript 去除空格 去除 html 标签

javascript 去除空格 去除 html 标签


<script>var   s   = " asd   ddd   bbb   s ss   ";       var   ss   =   s.replace(/\s/g, "");    alert(ss);var regEx = /<[^>]*>/g;var strText="我<font color=#ee00ee>Hello</font>how are<table>you.</table>"alert(strText.replace(regEx, ""));</script>
页: [1]
查看完整版本: javascript 去除空格 去除 html 标签