title: Refer to a html List item object properly in javascript for Event Registration
body: <p>I would like to know how I can refer to a list item object if I had for example the following html list  </p>
  
  <pre><code>&lt;div id="subdiv_2"&gt;  
   &lt;div id="subdiv_3"&gt;  
    &lt;ul&gt;  
     &lt;li&gt;&lt;a href=""&gt;Item1&lt;/a&gt;&lt;/li&gt;  
     &lt;li&gt;&lt;a href=""&gt;Item2&lt;/a&gt;&lt;/li&gt;  
     &lt;li&gt;&lt;a href=""&gt;Item3&lt;/a&gt;&lt;/li&gt;    
    &lt;/ul&gt;  
   &lt;/div&gt;  
  &lt;/div&gt;  
  </code></pre>
  
  <p>How is it possible to register an onclick to the Item2 li without it having to have a unique elementId
  eg I can do so for subdiv_3 because it has a unique ID and isn't in the list by  </p>
  
  <pre><code>document.getElementById('subdiv_3').addEventListener('click', function();, false);
  </code></pre>
  
  <p>My goal is ultimately to assign a function to each list object, for the number of list objects with unique parameters based upon the list object number eg:  </p>
  
  <pre><code>for(i=0;i&lt;list.length;i++){  
   "document.getElementById(list.item"+i+").addEventListener(\'click\',function("+i+");,false);";  
  }
  </code></pre>