html type="number" 在IOS中无效 还能输入其他类型字符问题

解决 方法 

 oninput="this.value=this.value.replace(/[^0-9.]+/,'');"

例如:

<input id="dutyarea" type="number" class="mui-input-clear" placeholder="请输入值班用房面积(平方米)..."  oninput="this.value=this.value.replace(/[^0-9.]+/,'');"/>

  

  

原文地址:https://www.cnblogs.com/banyuege/p/9890161.html