How can I determine which li in an ul has been clicked upon?
<p>I'm making a quiz game in HTML/JavaScript which selects questions at random and adds the question and answer to the page (<code>document.getElementById, innerHTML</code> etc.) </p>

<p>I want to add a click listener so when an answer is clicked it will determine if it is correct  or not. How should I set up this listener (or listeners?) to distinguish between <code>li</code>s.</p>

<p>JavaScript</p>

<pre><code>var elementQuestion = document.getElementById("question"); 
var elementAnswers = document.getElementById("answers"); 
elementQuestion.innerHTML = question[currentQuestion]; 
for(a = 0; a &lt; answers[currentQuestion].length; a++) {
    var li = document.createElement("li");
    li.innerHTML = answers[currentQuestion][a];
    elementAnswers.appendChild(li);
}
</code></pre>

<p>HTML</p>

<pre><code>&lt;!-- Question --&gt;
&lt;p id="question"&gt; &lt;/p&gt;
&lt;!-- Answer Array --&gt;
&lt;ul id="answers"&gt; &lt;/ul&gt;
</code></pre>

<p>(I get the feeling I'm missing something obvious...) Thanks </p>
