Help me understand whats wrong with my javascript
<p>If I do this-</p>

<pre><code>alert(anchor);
</code></pre>

<p>I get this-</p>

<blockquote>
  <p>"[object HTMLLIElement]"</p>
</blockquote>

<p>... ok, yep, it is the element I want. So I want to get that elements ID.</p>

<p>So I test it like this:</p>

<pre><code>alert(anchor.attr("id"));
</code></pre>

<p>... but I don't get any alert, nothing. I must not be selecting an element. What am I doing wrong, what don't I understand?</p>
