解決 html5 input type='number' 類型能夠輸入點.

設置只能輸入整數時,input 爲number類型 仍然能夠輸入小數點,設置如下屬性,鍵盤小數點輸入無效:html <input type='number' onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode) ) )' /> 原文:https://www.cnblogs.com/Sky-Ice/p/9503763.h
相關文章
相關標籤/搜索