Ajax: format meaning

$.ajax({options});
url: (string) The address to send the request, it can be a server page or a WebService action.

type: (string) request method, POST or GET

data: (object) The data brought when sending a request to the server. is in the form of key:value pairs,
Such as: {name:"grayworm",sex:"male"}, if it is an array {works:["work1","work2"]}

dataType: (string) The data type expected to be returned. xml, html, json, text, etc.

beforeSend: (Function) Triggered before sending an ajax request, if it returns false, the request will be canceled. If the asynchronous request needs to display the gif animation, it should set the visible of the corresponding <img> here.



----------------------------------------------------------------------------------------------------------------
Reprint Statement : This article is an original article by the blogger and may not be reproduced without the permission of the blogger.

----------------------------------------------------------------------------------------------------------------

If you have any questions in the article, you can comment in the comment area to discuss the mysteries of programming together!

----------------------------------------------------------------------------------------------------------------
  Come here, please give a thumbs up




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325870978&siteId=291194637