标签:code rip var set false event amp 输入 key
代码如下:
<input onkeypress="setNumber()">
<script>
function setNumber(){
var keyCode = event.keyCode;
if ((keyCode >= 48 && keyCode <= 57)) {
event.returnValue = true;
} else {
event.returnValue = false;
}
}
</script>
标签:code rip var set false event amp 输入 key
原文地址:http://www.cnblogs.com/leepyng/p/6000556.html