0
$.ajax({ 
        async: true,
        type: "POST",
        url: "http://'localhost'/Health/appointment?DoctorName=" + u + "&Password=" + p + "&dbversion=1.3",
        contentType: "application/json",
        dataType: "jsonp",                               
        success: function (msg) {
             //alert("in success: " + JSON.stringify(msg) + " " + msg.flag + " " + msg.UserID + " " + msg.DoctorId);
            window.location.href = 'option.html?UserID=' + msg.UserID + '&DoctorId=' + msg.DoctorId;

        },error: function(response) {
            alert("in Error");
        }               
});
4

1 回答 1

0

使用 dataType: json
而不是 jsonp

于 2013-09-20T09:15:36.757 回答