Answers for "ajax pass data"

1

passing data variable using ajax

var myVar = "test";

 $.ajax({
  url: "test.php",
  type: "POST",
  data:{"myData":myVar}
}).done(function(data) {
     console.log(data);
});
Posted by: Guest on May-06-2020

Code answers related to "ajax pass data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language