I am so surprised to see, this simple code doesn't work in IE, can anyone please tell why???
Thanks
<html>
<head>
<title>check the value</title>
<script language="JavaScript" type="text/javascript">
function intCheck(val){
if( val < 0 || val > 9)
document.write ("This value is out of range, please enter an integer value between 0 and 9");
else if (val > 0 || val < 9)
document.write ("good, that's what I was expecting")
else
document.write ("hello, please type a number")
}
</script>
</head>
<body>
<form name="form1">
<input type="text" name="text1" onchange="intCheck(this.value)">
</form>
</body>
</html>
Thanks
<html>
<head>
<title>check the value</title>
<script language="JavaScript" type="text/javascript">
function intCheck(val){
if( val < 0 || val > 9)
document.write ("This value is out of range, please enter an integer value between 0 and 9");
else if (val > 0 || val < 9)
document.write ("good, that's what I was expecting")
else
document.write ("hello, please type a number")
}
</script>
</head>
<body>
<form name="form1">
<input type="text" name="text1" onchange="intCheck(this.value)">
</form>
</body>
</html>