function checkRate(input)
{
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字,//若判断正整数,则后边是:/^[1-9]+[0-9]*]*$/
if (!re.test(input.rate.value))
{
alert("请输入数字(例:0.02)");
input.rate.focus();
return false;
}
}
function BASEisNotNum(theNum)
{
if (BASEtrim(theNum)=="")
return true;
for(var i=0;i<theNum.length;i++){
oneNum=theNum.substring(i,i+1);
if (oneNum<"0" || oneNum>"9")
return true;
}
return false;
}
function BASEisNotInt(theInt)
{
theInt=BASEtrim(theInt);
if ((theInt.length>1 && theInt.substring(0,1)=="0") || BASEisNotNum(theInt)){
return true;
}
return false;
}
function ismonth(str)
{
for(ilen=0;ilen<str.length;ilen++)
{
if(str.charAt(ilen) < '0' || str.charAt(ilen) > '9' )
{
if((str.charAt(ilen)!='-'))
return false;
}
}
return true;
}
function BASEisNotFloat(theFloat)
{
len=theFloat.length;
dotNum=0;
if (len==0)
return true;
for(var i=0;i<len;i++){
oneNum=theFloat.substring(i,i+1);
if (oneNum==".")
dotNum++;
if ( ((oneNum<"0" || oneNum>"9") && oneNum!=".") || dotNum>1)
return true;
}
if (len>1 && theFloat.substring(0,1)=="0"){
if (theFloat.substring(1,2)!=".")
return true;
}
return false;
<script>
if(isNaN(document.login.imgcode.value)){
alert('验证码不是数字!')
document.login.imgcode.focus();
return false;
}
</script>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有