is_bool()、
is_float()、
is_integer()、
is_numeric()、
is_string()、
is_array()、
is_object()。 你用is_numeric()、

解决方案 »

  1.   

    function IsDigit(cCheck)
      {
       return (('0'<=cCheck)&&(cCheck<='9'));
      }//==========================================================
    strNum=document.PublicInfo.text1.value
       for(nIndex=0;nIndex<strNum.length;nIndex++)
         {
          cCheck=strNum.charAt(nIndex);
          if(!IsDigit(cCheck))
            {
            alert("");
            document.PublicInfo.text1.focus();
            return false;
            }
         }
      

  2.   

    if IsNumeric(变量) then 
    是数字
    else
    不是数字
    end if