input只允許輸入數字,並且小數點后保留4位
<input type="text" value="" name="should_send_num" id="should_send_num" class="input-txt" onkeyup="clearNoNum(this)" onblur="clearNoNum(this)"> ...
<input type="text" value="" name="should_send_num" id="should_send_num" class="input-txt" onkeyup="clearNoNum(this)" onblur="clearNoNum(this)"> ...
<html> <head><meta http-equiv="content-Type" content="text/html;charset=gb2312"><title>js 只能輸入數字和小數點</title><script ...
1.給文本框添加一個onkeyup=’clearNoNum(this)’點擊事件 2.建立clearNoNum方法 1 2 3 4 5 6 7 8 3將金 ...
...
1.限制只能輸入正數和小數保留小數點后兩位 View Code 2.只能輸入正整數 View Code 3.輸入正數和小數(保留兩位) View Code ...
就是這么簡單! ...