function checkNum(){
var num1=document.getElementById("num1").value;
var num2=document.getElementById("num2").value;
if(num1 == "" || num2== "" ){
window.alert("not null");
return false;
}
//不能带gi
var reg=/^[1-9]d*(.[0-9]+)?$|^0$/i;
if(!reg.test(num1) || !reg.test(num2)){
window.alert("input numbers only");
return false;
}
}