input number 类型输入中文 光标异常
input number 类型输入中文 光标异常
const input=document.querySelector('input[type=number]');
if(input){
input.oninput=(e)=>{
if(e.data===''&&e.target.value===''){
e.target.value='0'
setTimeout(()=>{
e.target.value=''
},0)
}
}
}