<input type="text" oninput="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''">
js 正则 只能输入数字和小数点后两位
猜你喜欢
转载自blog.csdn.net/gyq04551/article/details/81004846
今日推荐
周排行