js实现在字符串中提取数字_javascript技巧
来源:动视网
责编:小采
时间:2020-11-27 21:15:11
js实现在字符串中提取数字_javascript技巧
js实现在字符串中提取数字_javascript技巧:js实现在字符串中提取数字function getNum(text){var value = text.replace(/[^0-9]/ig,); alert(value);}
导读js实现在字符串中提取数字_javascript技巧:js实现在字符串中提取数字function getNum(text){var value = text.replace(/[^0-9]/ig,); alert(value);}

js实现在字符串中提取数字function getNum(text){
var value = text.replace(/[^0-9]/ig,"");
alert(value);
}
script>
js实现在字符串中提取数字_javascript技巧
js实现在字符串中提取数字_javascript技巧:js实现在字符串中提取数字function getNum(text){var value = text.replace(/[^0-9]/ig,); alert(value);}