Hi ,

I hope it would helpfull.

<html>
<head>
<script language="javascript"  src="jquery-1.3.2.min.js"></script>
<script>

function getLastTR()
{

alert($("#tbl tr:last").html());

}
</script>
</head>
<body>
<table id="tbl">
                <tr><td>first tr</td></tr>
                <tr><td><table><tr><td>II tr</td></tr></table></td></tr>
                <tr><td>III tr</td></tr>
        </table>
        <input type="button" name="bt" value="getLastTR" onclick="getLastTR
()" />
</body>
</html>


thanks
Prashant
On Nov 19, 7:20 pm, jkrassman <joakim.krass...@sportdykare.se> wrote:
> Hi, sorry if I am posting in the wrong group?
>
> I am having a simple nested table, looks like this
>
> <table id=mytable>
> <tbody>
> <tr>
> <td>test</td>
> <td><table><tr><td>New test</td></tr></table></td>
> </tr>
> </tbody>
> </table>
>
> So my problem is that I cant get the last TR within the first table?
>
> var Obj = $("table#list tbody>tr:last");
>
> Of course it looks at the last <tr> in the table, but how should I
> manage to get the last TR in the first table?
>
> Best regards, Joakim

Reply via email to