you can use javacript and ascill to check the input, find the example in the www.codeproject.com, it's very useful!
good luck!
good luck!
解决方案 »
- easyui的window报错
- 怎么innerHTML重复调用后,越来越慢?
- 从基础开始学js该买什么书来学??
- ●●●●●●●●●●●●●●●●●●●●●●●●●●●怎么遍历出window.Array.prototype啊????????????
- 关于cookies路径
- 如何相对定位DIV在一屏页面的中间?
- 有人能解释一下这句么? var evt = (evt) ? evt : ((window.event) ? window.event : "");
- 诚邀各路WEB高手,打造完美虚拟城市
- 求一个list/menu特效!!!急!急
- 求一个正则匹配
- 【FAQ 光标操作小结】
- 取得多行文本框的选定的内容
var e=window.event;
code=e.keyCode;
if(code >=48 && code <=57) return true;
else if(code == 46 && src.value.indexOf('.')==-1) return true;
else{ window.event.keyCode=null; return false; }
}
不够健全,自己改改就可以了
还要处理onpaste事件,ondrag事件的
onkeypress="return event.keyCode<=57 && event.keyCode>=48"
onpaste="return clipboardData.getData('text').match(/^\d+$/gi)!=null"
style="ime-mode:disabled"
ondragenter="return false" value="">