postJSON
jQuery.postJSON = function(data, url, success) {
return jQuery.ajax({
type: "POST",
url: url,
data: data,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: success
});
};
使用
$(function() {
$.postJSON("{}", "Validate.asmx/GetPs", funOK);
})
function funOK(msg) {
$.each(msg.d, function() {
for (ee in this) {
if (ee != '__type') {
$('#inf').append(this[ee]);
}
}
})
}
浙公网安备 33010602011771号