title: How to use innerHTML to display text
body: <p>for example if i want to display text from javascript side by side like this </p>
  
  <p>text1 text2 text3</p>
  
  <p>so I typed this code  </p>
  
  <pre><code>&lt;p id=displayText&gt; &lt;p&gt;
  &lt;script type="text/javascript"&gt;
  function doSomeThing()
  {
    //do something
    document.getElementById("displayText").innerHTML=text1;
    //do something
    document.getElementById("displayText").innerHTML=text2;
    //do something
    document.getElementById("displayText").innerHTML=text3;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I got only</p>
  
  <p>text3</p>
  
  <p>how can I do it.</p>