Answers for "jquery get api call"

7

jquery ajax get

$.ajax({
    	url: "www.site.com/page",
    	success: function(data){ 
    	    $('#data').text(data);
    	},
    	error: function(){
    		alert("There was an error.");
    	}
    });
Posted by: Guest on March-28-2020
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

Code answers related to "Javascript"

Browse Popular Code Answers by Language