Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to use load() method in jquery?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 314
    Comment on it

    Hi Reader's,
     Welcome to FindNerd, today we are going to discuss how to use load() in jquery?

     Basically load() method is used for loading data from server and putting return data into selected item,in simple word we can say that load() method is the simplest way to fetch data from the server.

     Syntax of load() method


     Let explain one by one

       url:- This is specifies the url which you want to load.(Required)
      data:-This is optional parameter and specifies data to send to the server with request.
      function(response,status,xhr):-This is occur when method is completed.(Optional)

    You can see below example:

     <!DOCTYPE html>
       <!--here define css-->
              <style type="text/css">
                 #width {
                  max-width: 600px;
                  margin: 0 auto;
      <script src=""></script>
              $("#box").load("test.html");//call here load() method and pass the url from where you want load data from server
          <div id="width">
            <div id="box"><h2>Let load data from server</h2></div>
            <button id ="btn">Load Data</button>

     When you will execute above code then after click on Load Data button you can get server data which url you have passed.


 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: