title: Change content of HTML element (div) for few seconds
body: <p>I have a function which executes on <code>click</code> event from a button. After it clicked it displays me my message "Email was send!" in place of form. </p>
  
  <p>After 5 seconds this message disappears and there is nothing left. How can I set the original content back to <code>div</code> after 5 seconds? Following is my snippet.</p>
  
  <pre><code>function myFunction() {
      document.getElementById("form").innerHTML = "Email was send!";
      setTimeout(function() {
          document.getElementById('form').style.display = 'none';
      }, 5000);
  }
  </code></pre>
  
  <p>I want to display my message for 5 seconds then back to original form content.</p>