JS 替换字符串中包含的所有的空格,或其他字符

<script>
var start = '11-11-21';
start = start.replace(/-/gm,'');
alert(start);
</script>


显示结果为111121

原文地址:https://www.cnblogs.com/liang-ling/p/3672484.html