[jquery]

해피데빙·2022년 12월 29일
0
$ajax({
success: function(){ 
}
})
  1. success
    Type: Function( Anything data, String textStatus, jqXHR jqXHR )
  • A function to be called if the request succeeds
  • three arguments
    • The data : returned from the server( formatted according to the dataType parameter or the dataFilter callback function, if specified)
    • status : a string describing the status
    • the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object

As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.

  1. dataType
dataType (default: Intelligent Guess (xml, json, script, or html))
Type: String
The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response 
(an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string).
The available types (and the result passed as the first argument to your success callback) are:
profile
노션 : https://garrulous-gander-3f2.notion.site/c488d337791c4c4cb6d93cb9fcc26f17

0개의 댓글