how to pass id name html to js function
<p>I tried to pass id name html to js function by i have code html :</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;
  &lt;a href="javascript:animal()"&gt;
    &lt;span class="animal" id="ani 1"&gt;dog&lt;/span&gt;
  &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
  &lt;a href="javascript:animal()"&gt;
    &lt;span class="animal" id="ani 2"&gt;dog&lt;/span&gt;
  &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
  &lt;a href="javascript:animal()"&gt;
    &lt;span class="animal" id="ani 2"&gt;dog&lt;/span&gt;
  &lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p></p>

<p>i want id name of span tag for some thing. How to pass it to function?</p>