title: Delete text inside div using Javascript
body: <p>I have an email form using MailChimp and I need to delete the "Thanks for subscribing" message inside a div  after 5 seconds but I can't select the text inside the div.
  I tried getElementById, querySelector, innerText, innerHTML, with and without #, but I keep getting null value. 
  I also tried querySelectorAll to see all the nodes and it shows the div and id as div#mce-error-response.responde and the text is inside the innerHTML</p>
  
  <pre><code>&lt;div id="mce-responses" class="clear"&gt;
      &lt;div class="response" id="mce-error-response" style="display:none" wfd-invisible="true"&gt;&lt;/div&gt;
      &lt;div class="response" id="mce-success-response" style="" wfd-invisible="true"&gt;Thank you for subscribing!&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <pre><code>let myForm = document.querySelector('#mc-embedded-subscribe-form');
  let msg = document.getElementById('#mce-success-response').innerHTML;
  
  myForm.addEventListener('submit', onSubmit);
  
  function onSubmit(e) {
      e.preventDefault();
  
      console.log(msg);
  </code></pre>
  
  <p>That div is being added by MailChimp after clicking submit
  Here's the code <a href="https://codepen.io/m4573r00/pen/GRpwdKJ" rel="nofollow noreferrer">https://codepen.io/m4573r00/pen/GRpwdKJ</a></p>
  
  <p>Here's the node
  <a href="https://ibb.co/gw0jf8J" rel="nofollow noreferrer">https://ibb.co/gw0jf8J</a></p>