function checkIsNum(param){ if("" != param.value){ if(isNaN(parseInt(param.value))){ alert('此处只能输入数字!'); param.focus(); } } }