1
如何将多个参数从jQuery传递到ASHX文件。我想用POST发送三个值,而不是GET。将多个参数从jQuery传递到ASHX
如何将多个参数从jQuery传递到ASHX文件。我想用POST发送三个值,而不是GET。将多个参数从jQuery传递到ASHX
$.ajax({
'type' : 'POST',
'url' : '/my_great_ashx_file.ashx',
'data' : {
'first_field' : 'foo',
'second_field' : 'bar',
'third_field' : 'buz'
},
'success' : function() {
alert('This was a triumph.');
}
})
$.post("test.php", { name: "John", time: "2pm" },
function(data) {
alert("Data Loaded: " + data);
});