Answers for "ajax data javascript"

3

ajax request in javascript

fetch('https://api.covid19api.com/summary')
            .then(response => response.json())
            .then(data => console.log(data))
            .catch(err => {
                console.log(err)
            });
Posted by: Guest on May-19-2021
6

ajax syntax in javascript

var id = empid;

$.ajax({
    type: "POST",
    url: "../Webservices/EmployeeService.asmx/GetEmployeeOrders",
    data: "{empid: " + empid + "}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(result){
        alert(result.d);
        console.log(result);
    }
});
Posted by: Guest on September-30-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