title: How to replace innerHTML with jQuery?
body: <p>I have written the code below but now I have to write this with jQuery because of security reasons. I have never done something with jQuery before and I really don't know, how to write this.
  I shouldn't mix the HTML with JS and should use createElement and stuff like that.</p>
  
  <pre><code>var demoName1 = "Peter Stone";
  function showMessage() {
      var newMsg = '&lt;div id="messageBoxSend"&gt;' +
          '&lt;div class="nameSend"&gt;' + demoName1 + '&lt;/div&gt;' +
          '&lt;div class="text"&gt;' +
          ' &lt;div id="FscToolPaneNoseSend"&gt;' +
          '&lt;/div&gt;&lt;/div&gt;' +
          document.getElementById('inputText').value;
  
  var a = new Date();
      var b = a.getHours();
      var c = a.getMinutes();
      if (c &lt; 10) {
          c = "0" + c;
      }
      var time = b + ':' + c;
  
      newMsg += '&lt;div class="time"&gt;' + time + '&lt;/div&gt;' +
          ' &lt;/div&gt;&lt;/div&gt;&lt;br&gt;';
  ...
  }
  </code></pre>