jQuery Misc get() Yöntemi
Örnek
İlk <p> öğesinin adını ve değerini alın:
$("button").click(function(){
var x = $("p").get(0);
$("div").text(x.nodeName + ": " + x.innerHTML);
});
Tanım ve Kullanım
get() yöntemi, seçici tarafından belirtilen DOM öğelerini alır.
Sözdizimi
$(selector).get(index)
Parameter | Description |
---|---|
index | Optional. Specifies which of the matching elements to get (by index number) |