<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 ...
就是这么简单! ...