js限制输入框只能输入两位小数点 其他 2021-02-08 15:19 0 阅读 通过onimput事件和正则实现 <input type="number" oninput="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> 猜你喜欢