JS判断字符串是否全部为数字
JS判断字符串是否全部为数字
val = "123456" var isnum = /^\d+$/.test(val);
val = "1232232" var isnum ; var reg = /^[0-9]+.?[0-9]*$/ isnum = reg.test(val);
未完,待续......
JS判断字符串是否全部为数字
val = "123456" var isnum = /^\d+$/.test(val);
val = "1232232" var isnum ; var reg = /^[0-9]+.?[0-9]*$/ isnum = reg.test(val);