Wednesday, September 30, 2009

[jQuery] Re: How to print tag name

console.log($('table:first tr').find(':first-child')[0].tagName);

- Richard

On Wed, Sep 30, 2009 at 1:55 AM, David .Wu <chan15tw@gmail.com> wrote:

The code below show [ td ], can I got the tagName like "td"?

<table>
<tr><td>1</td></tr>
</table>

console.log($('table:first tr').find(':first-child'));

No comments: