我刚从1.4升级到JQuery 1.5.2,我的PostForm现在不能工作。它发布到页面,但即使没有错误,它说有错误。JQuery升级和AJAX
function TestPostForm(){
$.ajax({
type: "POST",
url: "process.jsp",
data: 'operation=Test&ui=TestUser',
dataType: "application/x-www-form-urlencoded",
async: false,
success: function(response) {
alert('Success');
return response;
},
error: function(xhr, ajaxOptions, thrownError) {
alert("There was an error : " + xhr.status);
}
});
}
Java代码:process.jsp
if (operation.equals("Test")) {
String ui = request.getParameter("ui");
out.println("Ok" + ui);
}
什么是'out' var。它会得到回应吗? – Neal 2011-04-18 19:07:44