if(document.formname.inputname.value!=""&&!document.formname.inputname.value.match(/^(\d)+$/)){
alert ("只接受数字")
return false;
}