title: Delete button to remove An ID - Javascript
body: <p>I have a script that will add some text with a checkbox vertically, like a To Do list.</p>
  
  <p>This works fine, and I tried to add a 'delete' button to remove individual entries but I'm getting nowhere,I tried writing the 'delete' code myself but it seems completely useless, any help would be greatly appreciated!</p>
  
  <p>HTML:</p>
  
  <pre><code>       Enter What To Do&lt;input id='userInput' size=60&gt; &lt;button onClick='userSubmit()'&gt;Submit&lt;/button&gt;&lt;BR&gt;&lt;P&gt;
         &lt;div id='result'&gt;&lt;/div&gt;
         &lt;button onClick='userDelete()'&gt;X&lt;/button&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;function userSubmit() {
  var UI=document.getElementById('userInput').value;
  document.getElementById('result').innerHTML+='&lt;input type="checkbox"&gt; '+UI+'&lt;br&gt;';}   &lt;/script&gt;
  
      &lt;script type='text/javascript'&gt;function userDelete(){
      var UI=document.getElementById('result');
      document.getElementById('result').innerHTML-='' '+UI+';}&lt;/script&gt; 
  </code></pre>
  
  <p>updated in fiddle</p>
  
  <p><a href="http://jsfiddle.net/64u4B/" rel="nofollow">http://jsfiddle.net/64u4B/</a></p>