无标题文档
function MaxValue()
{
//var str ="6";
//var str=document.getElementByname(str).value.trim();
// var str=document.getElementByname(str).value;
var num=document.getElementById("num").value;
if(num.length!=0){
if(num"0")
{
alert("ok");
return true;
}
else{
alert("对不起,您借阅图书不能超过5本");//请将“数字”改成你要验证的那个属性名称!
return false;
}
}
else{
alert("输入的数字不能为空!");
return false;
}
}
本
本文来源于网络:查看 >https://blog.csdn.net/javahuangfang/article/details/7554343