How to return the ID of this span under a LI nodeObject using javascript or Jquery
<p>So I have </p>

<pre><code>&lt;li&gt;
&lt;span id="foobar"&gt; abc &lt;/span&gt;
&lt;/li&gt;
</code></pre>

<p>I now have <code>li</code> as an nodeObject. I could get <code>"LI"</code> by using <code>li.nodeName</code>.</p>

<p>Now how could I get <code>"foobar"</code> out of <code>li</code> which is an ID of a span inside it.</p>

<p>I tried:</p>

<pre><code> $node = li;
 alert($node&gt;span.Id);
</code></pre>

<p>but not working, thanks!</p>
