<html>
<head>
<title>Testing value in range</title>
<script type="text/javascript">
var nValue = 0;
if (nValue >= 0 && nValue <= 100) {
alert("value between 0 and 100, inclusive");
} else if (nValue > 0 && nValue < 100) {
alert("value between 0 and 100 exclusive");
} else if (nValue > 100) {
alert ("value over 100");
} else if (nValue > 0) {
alert ("value is negative");
}
</script>
</head>
<body>
</body>
</html>
|