title: Dynamically Remove Items from list Javascript
body: <p>I have the following code snippet (Not self written, obtained from <a href="https://stackoverflow.com/questions/17773938/add-a-list-item-through-javascript">Add a list item through javascript</a>)</p>
  
  <p>Demo of relevant Script here: <a href="http://jsfiddle.net/Gmyag/" rel="nofollow">http://jsfiddle.net/Gmyag/</a></p>
  
  <p>The HTML Portion:</p>
  
  <pre><code>First name:
  &lt;input type="text" id="firstname"&gt;
  &lt;br&gt;
  &lt;p&gt;Your first name is: &lt;b id='boldStuff2'&gt;&lt;/b&gt; 
  &lt;/p&gt;
  &lt;p&gt;Other people's names:&lt;/p&gt;
  &lt;ol id="demo"&gt;&lt;/ol&gt;
  &lt;input type='button' onclick='changeText2()' value='Submit' /&gt;
  </code></pre>
  
  <p>The JS portion:</p>
  
  <pre><code>var list = document.getElementById('demo');
  
  function changeText2() {
      var firstname = document.getElementById('firstname').value;
      document.getElementById('boldStuff2').innerHTML = firstname;
      var entry = document.createElement('li');
      entry.appendChild(document.createTextNode(firstname));
      list.appendChild(entry);
  }
  </code></pre>
  
  <p>And need to know how one would add a dynamic button that appears next to each entry, say, an "X" mark that once clicked would remove that entry from the array and from the list.</p>
  
  <p>Any and all help is greatly appreciated.</p>