📜  javascript代码示例中的ajax语法

📅  最后修改于: 2022-03-11 15:04:24.996000             🧑  作者: Mango

代码示例2
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);
    }
});