title: How do I assign value of the clicked button
body: <p>I have the following on jsfiddle. What I need to accomplish is when I click on a button the respective value is inserted in the blank.</p>
  
  <p><a href="https://jsfiddle.net/aminbaig/jefee77L/" rel="nofollow noreferrer">https://jsfiddle.net/aminbaig/jefee77L/</a></p>
  
  <p>Here is the Code:</p>
  
  <p>HTML:</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-html lang-html prettyprint-override"><code>There is &lt;span id="title"&gt;___________&lt;/span&gt; wrong with this world!
  &lt;p&gt;
    Choose the appropriate word
  &lt;/p&gt;
  &lt;input type="submit" id="myTextField" value="something" onclick="change()" /&gt;
  &lt;input type="submit" id="byBtn1" value="Truck" onclick="change()" /&gt;
  &lt;input type="submit" id="byBtn2" value="Trash" onclick="change()" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Javascript:</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 change() {
  
    var myNewTitle = document.getElementById('myTextField').value;
    if (myNewTitle.length == 0) {
      alert('Write Some real Text please.');
      return;
    }
  
    var title = document.getElementById('title');
    title.innerHTML = myNewTitle;
  
  }</code></pre>
  </div>
  </div>
  </p>