title: How to get an element by name and set its value
body: <p>There should be a simple solution for this.  I need to get an input element by name and set its value.</p>
  
  <p>The following Javascript does not work:</p>
  
  <pre><code>x = document.getElementsByName($('#questions').val());
  x.value=this.value;  
  </code></pre>
  
  <p>Is there a simple solution using JQuery?</p>