87,997
社区成员




<html>
<head>
<script>
var f=true;
window.onload = (function(){
txt1.onkeydown=function(){
f=(f&&event.keyCode!=48);
};
btn1.onclick=function(){
if(f)
alert("correct");
else{
alert("fault");
f=true;
}
};
});</script>
</head>
<body>
<input type=button id=btn1>
<input type=text id=txt1>
</body>
</html>