<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查询</title>
<script language="javascript" type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" >
$(document).ready(function ()
{
$('#test_post').click(function (){
$.ajax({
async:false,
url: "http://221.123.158.108/2.asp",
type: "GET",
dataType: 'jsonp',
jsonp: 'jsoncallback',
data: {username:'lsxk5',password:'lsxk2013'},
timeout: 5000,
beforeSend: function(){
},
success: function (json) {
if(json.actionErrors.length!=0){
alert(json.actionErrors);
}
genDynamicContent(qsData,type,json);
},
complete: function(XMLHttpRequest, textStatus){
$.unblockUI({ fadeOut: 10 });
},
error: function(xhr){
alert("请求出错(请检查相关度网络状况.)");
}
});
}); //fun
});
</script>
</head>
<body >
<a href="#" id="test_post">查询</a>
</body>
</html>
执行后:“请求出错(请检查相关度网络状况.)”,而事实 上http://221.123.158.108/2.asp 是正常连通的