Horje
ajax exmaple\ Code Example
ajax exmaple\
$.ajax({
    url:'your url',
    type: 'POST',  // http method
    data: { myData: 'This is my data.' },  // data to submit
    success: function (data, status, xhr) { // after success your get data
        $('p').append('status: ' + status + ', data: ' + data);
    },
    error: function (jqXhr, textStatus, errorMessage) { // if any error come then 
            $('p').append('Error' + errorMessage);
    }
});
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);
    }
});




Javascript

Related
reactjs onclick open new page Code Example reactjs onclick open new page Code Example
javascript voice reader Code Example javascript voice reader Code Example
open a new tab when clicking on a link react Code Example open a new tab when clicking on a link react Code Example
javascript change url hash Code Example javascript change url hash Code Example
node print stdin Code Example node print stdin Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7