且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获得倒数第二个元素

更新时间:2022-06-22 04:22:50

无法看到您的HTML,请尝试:

Can't see your html but try this:

$("a:last").prev();

这应该给你最后一个元素之前。

That should give you the one before the last element.

您甚至可以尝试:

$("a:last").eq(-1);