<!--#include file="conn.asp"-->
<%
name=request.querystring("name")
Set rs = Server.CreateObject ("ADODB.Recordset")
sql = "Select * from u_ser where u_name='"&name&"'"
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
response.write("true")
else
response.write("false")
end if
rs.close
set rs=nothing
call CloseDatabase
%>
如何將非同步擷取的資訊顯示在當前頁呢
function updatePage() {
if (xmlHttp.readyState < 4) {
test1.innerHTML="loading...";
}
if (xmlHttp.readyState == 4) {
var response = xmlHttp.responseText;
test1.innerHTML=response;
}
}
其中xmlHttp.readyState中的readyState表示伺服器在處理請求時的進展狀況,其值分別有0-4,各有其說明情況,具體請參看