getting ID of <li> in javascript function
<p>I'm trying to get the ID of a <code>&lt;li&gt;</code> item.</p>

<p>The item is as follows:</p>

<pre><code>echo ($y&lt;$sites-1)?"&lt;li id='" . $sit[0] ."'&gt;":"&lt;li id='$sit[0]' class=\"last\"&gt;";
echo "&lt;a href=\"javascript:selectedSite();\" onClick=\"javascript:submit(1);\" onMouseOver=\"mouseAction(1)\" onMouseOut=\"mouseAction(0)\"&gt;" . $sit[1] . "&lt;/a&gt;&lt;/li&gt;";
</code></pre>

<p>and this is my function:</p>

<pre><code>function selectedSite()
{
    alert(/*I want the ID goes here*/);
}
</code></pre>
