jQuery | Misc get() Method Last Updated : 27 Feb, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The get() Method in jQuery is used to get the DOM element specified by the selectors. Syntax $(selector).get(index) Parameters: This method accepts single parameter index which is optional. It is used to specify which of the matching elements to get by its index number. Example 1: This example uses get() method to get the element specified by selector. html <!DOCTYPE html> <html> <head> <title> jQuery Misc get() Method </title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> </head> <body style="text-align:center;"> <h1 style = "color:green;" > GeeksforGeeks </h1> <h2>jQuery Misc get() Method</h2> <button>Click</button> <div></div> <script> $(document).ready(function() { $("button").click(function() { var x = $("h1").get(0); $("div").text(x.nodeName + ": " + x.innerHTML); }); }); </script> </body> </html> Output: Before Click on the button: After Click on the button: Example 2: This example use get() method to get the element specified by selector. html <!DOCTYPE html> <html> <head> <title> jQuery Misc get() Method </title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> </head> <body style="text-align:center;"> <h1 style = "color:green;" > GeeksForGeeks </h1> <h2>jQuery Misc get() Method</h2> <button>Click</button> <!-- Script to use get() method --> <script> $(document).ready(function(){ $("button").click(function(){ var x = $("h1").get(0); alert(x.nodeName + ": " + x.innerHTML); }); }); </script> </body> </html> Output: Before Click on the button: After Click on the button: Comment More infoAdvertise with us Next Article jQuery | Misc get() Method S SHUBHAMSINGH10 Follow Improve Article Tags : Web Technologies JQuery jQuery-Misc Similar Reads jQuery | get() Method In jQuery .get() method loads data from the server by using the GET HTTP request. This method returns XMLHttpRequest object. Syntax $.get( url, [data], [callback], [type] ) Parameters url : String containing the URL at which request is to be sent data : This is an optional parameter that represents 2 min read jQuery getJSON() Method In this article, we will learn about the getJSON() method in jQuery, along with understanding their implementation through the example. jQuery is an open-source JavaScript library that simplifies the interactions between an HTML/CSS document, It is widely famous for its philosophy of âWrite less, do 2 min read jQuery | Misc param() Method The param() method in jQuery is used to create a representation of an array or an object. This representation is created in a serialized way. This serialized values can be used in making an ajax request in URL. Syntax: $.param(object, trad) Parameter: object: Specifies an array or object to serializ 1 min read JQuery sub() Method This sub() method in JQuery is used to display the string as subscript text. This method returns the string embedded in the tag, like this: <sub> string </sub>.Syntax:Â string.sub()Parameters: This method does not accept any parameter.There are two examples discussed below:Example 1: In t 1 min read jQuery getScript() Method The getScript() method in jQuery is used to run a JavaScript using AJAX HTTP GET request. Syntax: $(selector).getScript(url, success(response, status))Parameters: It contains two parameters as mentioned above and described below: url: It is a required parameter. It holds the url to whom the request 2 min read Like