关于js验证字符串是否为纯数字

今天作一个商品数量的验证,能够不用正则co if(isNaN(tran_count)||tran_count.indexOf('.')!=-1||tran_count.indexOf('-')!=-1||tran_count.indexOf('0')==0){return alert('请输入正确的商品数量!');return false;index } 同理,若是是价格也同样 if(isNaN(
相关文章
相关标签/搜索