相思资源网 Design By www.200059.com
复制代码 代码如下:
<SCRIPT LANGUAGE="JavaScript">
<!--
function ajaxByJyking(){
var xmlhttp_request = "";
try{
if( window.ActiveXObject ){
for( var i = 5; i; i-- ){
try{
if( i == 2 ){
xmlhttp_request = new ActiveXObject( "Microsoft.XMLHTTP" ); }
else{
xmlhttp_request = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" );
xmlhttp_request.setRequestHeader("Content-Type","text/xml");
xmlhttp_request.setRequestHeader("Charset","gb2312"); }
break;}
catch(e){
xmlhttp_request = false; } } }
else if( window.XMLHttpRequest )
{ xmlhttp_request = new XMLHttpRequest();
if (xmlhttp_request.overrideMimeType)
{ xmlhttp_request.override.MimeType('text/xml'); } } }
catch(e){ xmlhttp_request = false; }
xmlhttp_request.open('GET', 'https://www.jb51.net', true);
xmlhttp_request.send(null);
xmlhttp_request.onreadystatechange = function(){
if (xmlhttp_request.readyState == 4) {
// 收到完整的服务器响应
document.write("yes")
} else{
alert(1)
}
}
}
ajaxByJyking();
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function ajaxByJyking(){
var xmlhttp_request = "";
try{
if( window.ActiveXObject ){
for( var i = 5; i; i-- ){
try{
if( i == 2 ){
xmlhttp_request = new ActiveXObject( "Microsoft.XMLHTTP" ); }
else{
xmlhttp_request = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" );
xmlhttp_request.setRequestHeader("Content-Type","text/xml");
xmlhttp_request.setRequestHeader("Charset","gb2312"); }
break;}
catch(e){
xmlhttp_request = false; } } }
else if( window.XMLHttpRequest )
{ xmlhttp_request = new XMLHttpRequest();
if (xmlhttp_request.overrideMimeType)
{ xmlhttp_request.override.MimeType('text/xml'); } } }
catch(e){ xmlhttp_request = false; }
xmlhttp_request.open('GET', 'https://www.jb51.net', true);
xmlhttp_request.send(null);
xmlhttp_request.onreadystatechange = function(){
if (xmlhttp_request.readyState == 4) {
// 收到完整的服务器响应
document.write("yes")
} else{
alert(1)
}
}
}
ajaxByJyking();
//-->
</SCRIPT>
标签:
Ajax
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无javascript Ajax获取远程url的返回判断的评论...