前端:(火狐瀏覽器兼容) input type ="number",輸入英文字母的問題

輸入框設置只能輸入數字,通常瀏覽器都正常識別number,不過能輸入e,由於 e在數學上表明2.71828瀏覽器 一、有的人這麼解決:app <input type='number' οnkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode) ) )' />this 二、因爲火狐裏面沒有 input type ="numbe
相關文章
相關標籤/搜索