原文:js 驗證input文本框只能輸入數字和小數點

function check e var re d . , d if e.value if re.test e.value alert 請輸入正確的數字 e.value e.focus input type text id score style width: px name score onblur check this onkeyup this.value this.value.replace ...

2021-12-08 09:31 1 862 推薦指數:

查看詳情

輸入框input只能輸入數字小數點

輸入框input只能輸入數字小數點 只允許輸入數字(整數:小數點不能輸入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允許輸入小數(兩位小數)<input type ...

Tue Aug 20 00:21:00 CST 2019 0 2493
輸入框input只能輸入數字小數點

只允許輸入數字(整數:小數點不能輸入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允許輸入小數(兩位小數)<input type="text" onkeyup="value ...

Tue Apr 28 21:57:00 CST 2020 0 3178
輸入框input只能輸入數字小數點

只允許輸入數字(整數:小數點不能輸入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允許輸入小數(兩位小數)<input type="text" onkeyup="value ...

Tue Jan 07 17:12:00 CST 2020 5 3437
輸入框input只能輸入數字小數點

只允許輸入數字(整數:小數點不能輸入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允許輸入小數(兩位小數)<input type="text" onkeyup="value ...

Mon Feb 11 22:32:00 CST 2019 1 8424
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM