X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

jQuery Misc get() Method

jQuery Misc Methods jQuery Misc Methods

Example

Get the name and value of the first <p> element:

$("button").click(function(){
  x=$("p").get(0);
  $("div").text(x.nodeName + ": " + x.innerHTML);
});

Try it yourself »

Definition and Usage

The get() method gets the DOM elements specified by the selector.


Syntax

$(selector).get(index)

Parameter Description
index Optional. Specifies which of the matching elements to get (by index number)


jQuery Misc Methods jQuery Misc Methods


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook