load() method is a simple, but powerful AJAX method.
load() method loads data from a server and puts the returned data into the selected element.
- URL: It is used to specify the URL which need to load.
- data: It is used to specify a set of query key/value pairs to send along with the request.
- callback: It is the optional parameter which is the name of a function to be executed after the load() method is call.
Return Value: This method returns the requested data from server with the specified URL.
Here is the content of our example file: “demo.txt”:
<p>This is R.k. Jha </p>