返回值:jQueryeq(index)
概述
獲取第N個(gè)元素
這個(gè)元素的位置是從0算起。
參數(shù)
indexInteger
元素在jQuery對(duì)象中的索引
示例
描述:
獲取匹配的第二個(gè)元素
HTML 代碼:
<p> This is just a test.</p> <p> So is this</p>
jQuery 代碼:
$("p").eq(1)
結(jié)果:
[ <p> So is this</p> ]
?
This document uses PHP Chinese website manual Release