jQuery get() method loads data from the server using a HTTP GET request.
Requesting a URL
In the following example, we provide server-side coding for both PHP and Node.js, you can choose your favorite.
The following is the server-side coding using PHP.
<?phpecho"Hello User Welcome to ajax jquery";
The following is the server-side coding using Node.js.
res.send("Hello User Welcome to ajax jquery");
console.log("port is listening to 8000");
In the following client-side coding, we are not sending any data. Instead, we request a URL using jQuery get() method and receive a response.
HTML Online Compiler
<h1>jQuery get() Method</h1>
<p>Requesting url with no data using get() Method.</p>
<button>Send Get Request</button>