Home > Article > Web Front-end > Simple examples of get and post in jquery_jquery
Example:
test.html
Page reference
The post method is as follows:
$.post(access_url,{
first: "test1", second: "test2"
}, function(data){
if(data.success){
$(' #' tipE).html('Processed successfully'); 🎜> },'json'
) )
}
If you want to use the get method, just replace post with get. It’s quite simple!
The data value in this function is the value returned by the server and is in JSON format. Of course, other types can be used here, such as text, xml, etc.