• Thursday, February 27, 2014

    JQuery $.get function - jquery to load data from the server using HTTP GET

    GET is basically used for getting your data from the server.
    jQuery $.get() function request data from the server using HTTP GET.

    Syntax: $.get(url,CallBack);

    url: A string contains the url, to which request is send.

    CallBack: a function which execute when the request succeeds.


    alert("Success. Data: " + data);

    Full Example:
    <!DOCTYPE html>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
       $("#result").html("Please Wait.............");

    <div id="result"></div>
    <br />
    <input type="button" id="btn" value="Click Me" />

    Syed Masoom Rizvi

    Author & Editor

    Hi, This is Syed Masoom Rizvi, who is continue exploring the world of programming ,programming and programming... :)


    Post a Comment