js 正则 冒号

js 正则 冒号

var str="您的姓名:"str=str.replace(new RegExp((:)g),"")alert(str)这样就行,即将str中所有的冒号替换为空字符串。注意这个str里的冒号是中
JavaScript60