zl程序教程

您现在的位置是:首页 >  前端

当前栏目

javascript正则表达式

2023-09-14 08:59:56 时间
  • 去掉首位空格

str=str.replace(/^\s+|\s+$/g,''); 

  • 替换非数字

this.value=this.value.replace(/\D/g,'')