Cú pháp:
$(selector).post(url,data,success(response,status,xhr),dataType);
Example:
$.post('1.php',{bien1:"value1"},function(result){
$('#container').html(result);
});
$(selector).post(url,data,success(response,status,xhr),dataType);
| Parameter | Description | 
|---|---|
| url | Required. Specifies the url to send the request to | 
| data | Optional. Specifies data to send to the server along with the request | 
| success(response,status,xhr) | Optional. Specifies the function to run if the request succeeds Additional parameters: 
 | 
| dataType | Optional. Specifies the data type expected of the server response. By default jQuery performs an automatic guess. Possible types: 
 | 
Example:
$.post('1.php',{bien1:"value1"},function(result){
$('#container').html(result);
});
 






 
 
 
0 nhận xét:
Đăng nhận xét