Answer No : 4 :
<html>
<head>
<title>Lionet Computer Training Institute</title>
</head>
<body>
<p>Please input a number between 1 and 10:</p><br/>
<input type="text" id="numb"><br/><br/>
<button type="button" onclick="myFunction()">Submit</button><br/>
<p id="demo"></p><br/>
<script>
function myFunction()
{
var x, text;
x= document.getElementById("numb").value;
if (isNaN(x)||x<1||x>10)
{
text = "Input not valid";
}
else
{
text = "Input OK";
}
document.getElementById("demo").innerHTML = text;
}
</script>
</body>
</html>