title: Javascript function to change styling
body: <p>I have a function here that changes the heading, but i also want to make it so when, the heading has been successfully changed, the &quot;Change Back!&quot; button appears, and then once clicked, it resets the heading and makes the &quot;Change Back!&quot; button disappear again.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function changer () {
  
    var textArea = document.getElementById("text_box").value;
  
    if (textArea.length === 0) {
       alert("Please enter a value.");
       return;
    }
    var heading = document.getElementById("heading");
    heading.innerHTML = textArea;
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#change_back {
    display: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- HTML --&gt;
  &lt;h1 id="heading"&gt;This is a heading&lt;/h1&gt;
  &lt;button id="change_back"&gt;Change Back!&lt;/button&gt;
  
  &lt;input type="text" id="text_box"&gt;
  &lt;input type="submit" onclick="changer()"&gt;</code></pre>
  </div>
  </div>
  </p>