Note:The $. get () and $. post () methods are global functions in jQuery. The load () method mentioned above is used to operate jQuery objects.
1. $. get () method
The $. get () method uses the GET Method for asynchronous requests.
Its syntax structure is:
$. Get (url [, data] [, callback] [, type])
$. Get () method parameters are described as follows:
Parameter Name |
Type |
Description |
Url |
String |
URL of the requested HTML page |
Data (optional) |
Object |
The key/value data sent to the server will be appended to the request URL as QueryString. |
Callback (optional) |
Function |
The callback function when loading is successful (success calls this method only when Response returns the status) automatically passes the request result and status to this method. |
Type (optional) |
String |
The format of the content returned by the server, including xml, html, script, json, text, and _ default. |