If the number is 9
say it is 9
otherwise
say it is not
<script> function checkValue(){ var val = document.getElementById("num").value; if (val == 9) alert("the number entered is 9"); else alert("the number entered is not 9"); } </script>