<script>
function check(){
if (isNaN(document.all.textarea.value))
{document.all.textarea.value="";
return false;}
else
return true;}
</script><textarea name="textarea"   onKeyUp="return check()"></textarea>

解决方案 »

  1.   

    <input type="text" name="checknum" size="27" onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
      

  2.   

    限制edit中只能输入数字.
    等待,期待。
    up
      

  3.   

    function onlynumber(str)//判断是否只是数字
      {
      var i,strlength,tempchar;
       strlength=str.length;
       for(i=0;i<strlength;i++)
        {
         tempchar=str.substring(i,i+1);
          if(!(tempchar==0||tempchar==1||tempchar==2||tempchar==3||tempchar==4
          ||tempchar==5||tempchar==6||tempchar==7||tempchar==8||tempchar==9))
           {
             alert('只能输入数字');
             str="1";
             break;
            }
         }
        return str;
        }
      //-->
      

  4.   

    if(isNaN(form.IdNumber.value) == true){
    alert("请输入数字");
    return false;
    }
      

  5.   

    在InputTextBox中添加MaskType="Float" Format="Quantity",应该就可以了吧