只需在行内输入 onKeyUp="this.value=this.value.replace(/[^\.\d]/g,'');" 就解决了 <input type="number" onKeyUp="this.value=this.value.replace(/[^\.\d]/g,'');" > 相关文章: 2021-10-19 2021-11-16 2021-12-08 2021-12-08 2021-10-20 2021-07-24 2021-05-17 2021-11-13