title: Using substring within input field
body: <p>I'm using an ID scanner that acts as a keyboard input and I want an input field to listen for the value and substring (or slice) out unnecessary, extra values.</p>
  
  <p>Currently, the ID scanner formats numbers like this: ;708089113=0184?</p>
  
  <p>I want to grab only the 708089113. I want to remove the semi-colon and everything after the 3.</p>
  
  <p>I'm just not sure how to do this automatically. The stripped value should appear in the field before submitting.</p>
  
  <p>Javascript:</p>
  
  <pre><code>var suid = document.getElementById("SUID").value;
  var stripSUID = suid.substring(1,10); 
  
  document.getElementById("SUID").value = stripSUID;
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input name="SUID" id="SUID" type="text" value=""&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/jhjr288o/" rel="nofollow">JSFiddle Link</a></p>