input输入框只能输入正整数、或输入正整数和小数

input 输入数字类的一些判别  方法一:实现输入框只能输入正整数,输入同时禁止了以0开始的数字输入,防止被转化为其余进制的数值。html <input type='text' onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"> 方法二: 实现输入框只能输入正整数this   <input type="text"name="price"id="p
相关文章
相关标签/搜索