title: getelementsbyname not returning any value
body: <p>I've spent all day reading tutorials but can't seem to find an answer to this basic question.</p>
  
  <p>All I want to do is access the value of an input field.  I've made a basic stub to try and teach myself.  The desired behavior is that when I click the "submit" button, I should get an alert with the value of the number field "points".  However, when I put the following code in my website, then click the submit button, nothing happens.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function checknumber()
      {
          var testnumber=document.getelementsbyname("points").value;
          alert(testnumber);
      }
  &lt;/script&gt;
  &lt;input type="number" name="points" value="1"&gt;Points&lt;br&gt;
  &lt;input type="submit" onclick="checknumber();"&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Incidentally, if I get rid of the line with "getelementsbyname" and change the script as follows:</p>
  
  <pre><code>function checknumber()
  {
      var testnumber="hello world";
      alert(testnumber);
  }
  </code></pre>
  
  <p>Then everything works fine, I get an alert popup with the text "hello world" exactly as expected.</p>
  
  <p>Any help will be greatly appreciated.</p>