把下面的方法调用就行
<script language="javascript">
function nots(){
if ((event.keyCode <48) || (event.keyCode> 57 )) event.returnValue = false;
}
</script>
<script language="javascript">
function nots(){
if ((event.keyCode <48) || (event.keyCode> 57 )) event.returnValue = false;
}
</script>