title: Welcome message after filling a form
body: <p>I cannot figure out the code where I want the user of my website to fill a form and after submitting the form he/she gets a welcome message on the same sign-up page, not on a different page. Below is my code using <code>innerHTML</code>.</p>
  
  <pre><code>&lt;script&gt;
    function displayGreeting(){
      let name = document.getElementById(‘usrname’).value;
      document.getElementById(‘outputDiv’).innerHTML = “Hello” + usrname +
        “, Welcome to Livewell page &lt;br/&gt;” +
        “You are officially a livewell member “ + usrname + “!”;
    }
  &lt;/script&gt;
  </code></pre>
  
  
  
  <pre><code>&lt;center&gt;&lt;input type="submit" value="Create" onclick="displayGreeting()"/&gt;&lt;/center&gt;
  &lt;hr&gt;
  &lt;div id="outputDiv"&gt;&lt;/div&gt;
  </code></pre>