Answers for "Jquery ajac"

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)
  }
});
Posted by: Guest on May-03-2020
15

jquery ajax

$.ajax({

   url     : "file.php",
   method  : "POST",

       data: { 
         //key                      :   value 
         action                   	:   action , 
         key_1   					:   value_key_1,
         key_2   					:   value_key_2
       }
   })

   .fail(function() { return false; })
	// Appel OK
   .done(function(data) {

   console.log(data);

 });
Posted by: Guest on May-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language