function CheckNum(number)
{
var regNum = /^[\d]+$/;
var re=new RegExp(regNum);
if (re.test(number.value))
{
return true;
}
else
{
alert("必须是数字!");
document.getElementById("TextBox2").value="";
document.getElementById("TextBox2").focus();
}
}
if(document.getElementById("TextBox2").value.trim() != "")
{
if(!CheckNum(document.getElementById("TextBox2")))
{
return false;
}
}