title: Set an Element id to a variable - JavaScript / HTML
body: <p>I was wondering if it was possible to add an id to a variable in JavaScript.</p>
  
  <p>Like This...</p>
  
  <p><strong>JavaScript:</strong></p>
  
  <pre><code>var name = "#userid";
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;input type="text" id="userid" /&gt;
  </code></pre>
  
  <p>... So I want to set a variable to the input in the HTML. I have tried using </p>
  
  <pre><code>getElementById()
  </code></pre>
  
  <p>I'd like it so when a "userid" is entered into the input, I would like to set that to a variable in JS.</p>
  
  <p>Much Appreciated...</p>
  
  <p>Thank You, James Noon </p>