title: javascript Multiple space into input value self trim
body: <p>I have an input like this:</p>
  
  <pre><code>&lt;input type="hidden" name="myName" value="John Fitzgerald          Kennedy      " /&gt;
  </code></pre>
  
  <p>When I read the input content using Javascript:</p>
  
  <pre><code>var myName = document.getElementsByName("myName")[0].value;
  </code></pre>
  
  <p>The content of myName: <code>"John Fitzgerald Kennedy "</code>;</p>
  
  <p>How to have the content: <code>"John Fitzgerald          Kennedy         "</code>?</p>
  
  <p>I have to count the fixed chars between name and surname to find the surname and split correctly two separate strings.</p>
  
  <p>Thank you! </p>