懂得感恩,是收获幸福的源泉。懂得感恩,你会发现原来自己周围的一切都是那样的美好。
ajax.html
<script>
functionf(){
varreq=newActiveXObject("Microsoft.XMLHTTP");
req.open("GET","t.asp?t1="+t1.value,true);
req.onreadystatechange=function(){
if(req.readyState==4){
if(req.status==200){
msg.innerText=req.responseXML.documentElement.tagName;
}
}
}
req.send(null);
}
</script>
<div>1:显示"OK";其他字符:显示"Error"</div>
<inputid=t1value=1>
<inputtype=buttonvalue="检测"onclick="javascript:f()"><arel="nofollow noopener noreferrer" href="javascript:f()">检测</a>
<divid=msg></div>
t.asp
<%
Response.ContentType="text/xml"
response.charset="gb2312"
ifrequest.querystring("t1")="1"then
response.write("<OK/>")
else
response.write("<ERROR/>")
endif
%>
到此这篇关于Ajax 和 Asp 的编程就介绍到这了。积金遗于子孙,子孙未必能守;积书于子孙,子孙未必能读。不如积阴德于冥冥之中,此乃万世传家之宝训也。更多相关Ajax 和 Asp 的编程内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!