Hello. This is my program:
<html>
<head>
<script type="text/javascript">
function check()
{
if (document.getElementById("age").value!=1)
{
alert("error")
}
}
</script>
</head>
<body>
<form>
Age: <input type="text" id="age" size="30"><br />
Name: <input type="text" id="name" size="30"><br />
<input type="button" value="Check" onclick=check()>
</form>
</body>
</html>
and my question is how to make it display error if I have entered letters in the age box or numbers in a name box? Currently I have only if it is different from 1, so what should I write instead of 1 ?