you can use javacript and ascill to check the input, find the example in the www.codeproject.com, it's very useful!
good luck!

解决方案 »

  1.   

    function keyPressFlt(src){
    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事件的
      

  2.   

    <input type="text" 
      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="">