HTML and javascript forms are what I'm utilizing.
Only if the user enters a LETTER and hits submit do I want an alert to appear.
I have the HTML code here:
<form name="myForm" action="" onsubmit="return checkInp()" method="post">
First name: <input type="text" name="age">
<input type="submit" value="Submit">
And the javascript code:
function checkInp()
{
var x=document.forms["myForm"]["age"].value;
if (x consists of any letters) // this is the code I need to change
{
alert("Must input numbers");
return false;
}
}