正则表达式限制input输入框只能输入两个小数 其他 2021-02-08 15:19 0 阅读 <input type="number" oninput="value=value.match(/^\d+(?:\.\d{0,2})?/)"/> 这样就只能输入数字,并且小数点只能输入2位 猜你喜欢