JQuery AJAX调用 – 如何捕获响应JSON?
jQuery的:
$(document).ready(function(){ $('#QuoteSearch').submit(function(){ alert("in jquery"); $.ajax({ url: "ajaxJQuery", type: "POST", data: {username: $("#username").val(), password: $("#password").val()}, dataType: "json", error: function(){ alert('Error'); }, success: function(data){ alert('SUCCESS'); alert(data); } }); return false; }); });