<input onkeypress="return check()">
<script>
function check(){
with(window.event){
var ret=srcElement.value+String.fromCharCode(keyCode)
if(/\D/.test(ret)||parseInt(ret)>100)return false;
}
}
</script>