api ajax code example
Example 1: jquery ajax endpoint
$.ajax({
type:"GET/POST",
url: "target url",
data: "var1=" + data1,
success: function(msg){
$("#targethtml").html(msg)
},
error: function(errormsg){
console.log(errormsg)
}
});
Example 2: ajax
With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behaviour of the existing page.