<html>
<head>
<title>bian xie jiao ben</title>
</head>
<body>
<form>
please:<input type="text" name="num" onchange="checkme(this.form)">
</form>
</body>
<script language="javascript">
function isnumber(str)
{
exp=/[^0-9()-]/g;
if(str.search(exp) != -1 && str!="Your (O)icq")
{
alert("您输入的不是数字")
return false;
}
return true;
}
function checkme (f1)
 { inputstr=f1.num.value;
  if(isnumber(inputstr)){
   window.confirm("你输入的是 "+inputstr);
  }
  else{
   f1.num.focus();
  f1.num.select();
  }
}
</script>