怎么样判断输入的是不是数字? is_bool()、is_float()、is_integer()、is_numeric()、is_string()、is_array()、is_object()。 你用is_numeric()、 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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; } } if IsNumeric(变量) then 是数字else不是数字end if php新手求助 简单留言板问题 fpdf如何实现表格内容的自动换行 win2003+IIS环境配置PHP的CURL失败 送分:表单无法提交问题 php混编如何在当前页显示结果? 1000分求助EMAIL的解码,给出函数及调用方法和中文注释。(1个贴可能你就是明日之最) 关于下拉框调用函数问题? 关于header(location)的问题, 毕设求助 有没有好心的大神能帮我改下前端 老师说我前端做的太难看 周一就中期了 好心大神帮帮忙 如何处理PHP高并发问题 如何在线即时发短信? 项目需要PHP+JAVA
{
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;
}
}
是数字
else
不是数字
end if