html中input框禁止用户输入负数

1,257 阅读1分钟
<input oninput="value=value.replace('-', '')" />