Error Calling....Http Code:0???
$(function() {
$("#callAjax").click(function() {
var theName = $.trim($("#theName").val());
$.mobile.showPageLoadingMsg("加载数据中...");
if(theName.length > 0)
{
$.ajax({
type: "GET",
url: "http://192.168.100.1:8080/test/index.jsp",
dataType: "text",
success: onSuccess,
error: onError
});
}
});
$("#resultLog").ajaxError(function(event, request, settings, exception) {
$("#resultLog").html("Error Calling: " + settings.url + "<br />HTPP Code: " + request.status);
$.mobile.hidePageLoadingMsg();
});
function onSuccess(data,textStatus)
{
$("#resultLog").html("Result: " + data);
$.mobile.hidePageLoadingMsg();
}
function onError(param1, param2, param3)
{
$.mobile.hidePageLoadingMsg();
}
});
为什么老是返回:
Error Calling: http://192.168.100.1:8080/test/index.jsp
HTPP Code: 0