<script type="text/javascript">
function isNum(e)
{
if(e.value * 1 != e.value)
{
alert('请输入数字!');
e.value ='';
e.focus();
return false;
}
else
{
return true;
}
}
</script>
<input type='text' id='fuck' οnblur='return isNum(this);'/>
<script type="text/javascript">
function isNum(e)
{
if(e.value * 1 != e.value)
{
alert('请输入数字!');
e.value ='';
e.focus();
return false;
}
else
{
return true;
}
}
</script>
<input type='text' id='fuck' οnblur='return isNum(this);'/>