title: How to set button value in javascript
body: <p>I want to set different values of button under different situations. The modal display style is "none" at first. I try to use <code>$("#submitform").value ="Add Event";</code> however, it doesn't work. When the modal pops up, the button value is still empty. </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>var btn = document.getElementById("myBtn");
      btn.onclick = function() {
          $("#submitform").value ="Add Event";
          modal.style.display = "block";
      };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id = "myModal" class = "modal"&gt;
  &lt;form name="addEvtForm" class="addEvtForm" &gt;
    title:&lt;input type="text" name="title" id="title" autocomplete="title"&gt;&lt;br&gt;
    &lt;input type="button" value="" id="submitform"&gt;
  &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>