JS金額校驗

分享一個js的金額校驗方法,適用於用戶本身輸入金額支付的場景 html代碼html <input onkeyup='clearNoNum(this)' type='number' step='0.01' id='moneyNum' placeholder='輸入金額'> js代碼web function clearNoNum(obj) { //先把非數字的都替換掉,除了數字和.
相關文章
相關標籤/搜索