title: Check if input is number or letter javascript
body: <p>I'm using forms in HTML and javascript. I would like an alert to pop up only if the user inputs a <strong>LETTER</strong> and clicks <code>submit</code>.</p>
  
  <p>So I have the HTML code:</p>
  
  <pre><code>&lt;form name="myForm" action="" onsubmit="return checkInp()" method="post"&gt;
      First name: &lt;input type="text" name="age"&gt;
  &lt;input type="submit" value="Submit"&gt;   
  </code></pre>
  
  <p>And the javascript code:</p>
  
  <pre><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;
  }
  }
  </code></pre>