我在Jquery的代码是:
var accessUrl = 'testurl';
var accessApplication = 'testapplication';
$.ajax({
type: "POST",
url: 'http://www.serveripaddress.com/Service.asmx/InsertAnalytics',
// data: "{ 'URL': + $(this).context +','+'ApplicationName='+ $(this).context.innerHTML }",
data: "{URL:'" + accessUrl + "', ApplicationName:'" + accessApplication + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
success: function(data) {
//debugger;
alert('success.');
},
error: function() {
// // debugger;
alert('Failed');
}
});