<script type="text/javascript">
function checknumber(txt_id){
var mynumbervalue = txt_id.value;
if (mynumbervalue > 65){
txt_id.value = "0";
alert("Please try again.Values must be between 0-65. ...");
}
if(mynumbervalue < 0){
txt_id.value = "0";
alert("Please try again. Values must be between 0-65 ...");
}
}
</script>
HTML
<input id="thefirstnumbervalue" type="text" önchange="checknumber(this);" />
<input id="thesecondnumbervalue" type="text" önchange="checknumber(this);" />