title: How to concat strings from inputs with javascript?
body: <p>I got 3 fields: name, last name and concat.</p>
  
  <p>What I have to do is concat the first character of the field name with the last name.
  And as I write, the field Concat is changing.</p>
  
  <p>I have this by now:</p>
  
  <pre><code>&lt;p&gt;Name&lt;/p&gt;&lt;input type="text" id="name"  onChange="document.getElementById('concat').value=this[0].value;" /&gt;
  &lt;p&gt;Last name&lt;/p&gt;&lt;input type="text" id="last_name" document.getElementById('txt').value=document.getElementById('txt').value + this.value;"/&gt;
  &lt;p&gt;Concat&lt;/p&gt;
  &lt;input type="text" id="concat"  /&gt;
  </code></pre>
  
  <p>But the first character doesn't seem to be working, I think the problem might be in this[0].value; or how do I get the first chatacter, is there any other function to do it?.</p>
  
  <p>Thanks, beforehand.</p>