ajax simple use code example
Example: ajax example
$.ajax({
method: "POST",
url: "/controller/action",
data: { name: "John", location: "Boston" },
success: (result) => {
console.log(result);
},
error: (error) => {
console.log(error);
}
});