<!DOCTYPE html>
<html>
<body>
<p>Enter a number between 1 to 100:</p>
<input id="input-number-id" type="number" min="1" max="100">
<button onclick="checkFunction()">OK</button>
<p id="message-id"></p>
<script>
function checkFunction()
{
var obj = document.getElementById("input-number-id");
if (obj.checkValidity() == false)
document.getElementById("message-id").innerHTML = obj.validationMessage;
else
document.getElementById("message-id").innerHTML = "Input OK";
}
</script>
</body>
</html>
