please help me for my school project

what is the format of an AJAX request

Comments

  • An AJAX request can occur in any of the following formats.
    a) Text File
    b) HTML
    c) JSON object

    Here’s the standard format of an AJAX request for your consideration.
    $.ajax({
    type: "GET or POST",
    url: "API or your PHP handler URL ",
    datatype:"JSON",
    // depending on what kind of data you want back, but JSON is the most common
    data: { //a set of key:"value" pairs },
    success:function(data){ //handle a successful return of data },
    error:function(message){ //handle the error } });

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion