如何用 jquery 回调方法替换以下 ajax 回调方法?
function PostCall() {
$('#txtRes').val('Please Wait......');
var reqval = $('#txtReq').val();
$.ajax({
url: "myPage",
type: 'post',
data: "{'name':'" + reqval + "'}",
async: true,
contentType: "application/json",
success: function (result) {
$('#txtRes').val(result);
}
});
}