Ajax 和 Asp 的編程
更新時間:2006年10月18日 00:00:00 作者:
ajax.html
<script>
function f(){
var req =new ActiveXObject("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>
<input id=t1 value=1>
<input type=button value="檢測" onclick="javascript:f()"> <a href="javascript:f()">檢測</a>
<div id=msg></div>
t.asp
<%
Response.ContentType="text/xml"
response.charset="gb2312"
if request.querystring("t1")="1" then
response.write("<OK/>")
else
response.write("<ERROR/>")
end if
%>
復(fù)制代碼 代碼如下:
<script>
function f(){
var req =new ActiveXObject("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>
<input id=t1 value=1>
<input type=button value="檢測" onclick="javascript:f()"> <a href="javascript:f()">檢測</a>
<div id=msg></div>
t.asp
復(fù)制代碼 代碼如下:
<%
Response.ContentType="text/xml"
response.charset="gb2312"
if request.querystring("t1")="1" then
response.write("<OK/>")
else
response.write("<ERROR/>")
end if
%>
相關(guān)文章
AJAX根據(jù)城市名,自動完成相應(yīng)的城市信息
AJAX根據(jù)城市名,自動完成相應(yīng)的城市信息...2007-01-01jQuery Ajax顯示對號和錯號用于驗證輸入驗證碼是否正確
這篇文章主要介紹了jQuery Ajax顯示對號和錯號用于驗證輸入驗證碼是否正確的相關(guān)資料,需要的朋友可以參考下2017-04-04Ajax 的初步實現(xiàn)(使用vscode+node.js+express框架)
這篇文章給大家介紹使用vscode+node.js+express框架操作ajax的初步實現(xiàn)方法,本文給大家介紹的非常詳細,對大家的學(xué)習或工作具有一定的參考借鑒價值,需要的朋友參考下吧2021-06-06js+ajax處理java后臺返回的json對象循環(huán)創(chuàng)建到表格的方法
這篇文章主要介紹了js+ajax處理java后臺返回的json對象循環(huán)創(chuàng)建到表格的方法,涉及javascript操作json對象動態(tài)創(chuàng)建表格以及基于ajax與后臺交互的相關(guān)技巧,需要的朋友可以參考下2016-08-08ajaxrequest.js ajaxrequest 0.7最新版 使用AJAXRequest進行AJAX應(yīng)用程序開發(fā)入
ajaxrequest.js ajaxrequest 0.7最新版 使用AJAXRequest進行AJAX應(yīng)用程序開發(fā)入門小技巧...2007-12-12