返回值:jQueryeq(index)
概述
獲取第N個元素
這個元素的位置是從0算起。
參數(shù)
indexInteger
元素在jQuery對象中的索引
示例
描述:
獲取匹配的第二個元素
HTML 代碼:
<p> This is just a test.</p> <p> So is this</p>
jQuery 代碼:
$("p").eq(1)
結果:
[ <p> So is this</p> ]
?
本文檔使用 php中文網手冊 發(fā)布