title: how to select a specific list item from a ul javascript
body: <p>I have a function that adds list items that all have the same id to a ul. I want to be able to click a specific list item and change the id of only the one I clicked.</p>
  
  <p>so I'll call the function a few times and have it spit out:</p>
  
  <ul>
  <li>thing1</li>
  <li>thing2</li>
  <li>thing3</li>
  </ul>
  
  <p>then when I click thing2 the color changes from black to red.</p>
  
  <p>edit: in response to request for the code I tried.</p>
  
  <pre><code>function addlist(){
    var ask = prompt("what is the list item", "title");
    document.getElementById("thing").innerHTML += "&lt;li id='vid'&gt;&lt;a href='#'&gt;" + ask+ "&lt;/a&gt;&lt;/li&gt;";
  </code></pre>
  
  <p>}   </p>