最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ajax检测用户名 教程二
时间:2022-07-02 22:42:43 编辑:袖梨 来源:一聚教程网
第三步:把数据发送给asp脚本进行处理.
<%
Response.ContentType = "text/html"
Response.Charset = "GB2312" '解决乱码问题
response.buffer=true '禁止缓存
response.expires=0
dbDir="ajax.mdb"
set conn=Server.CreateObject("ADODB.Connection")
connStr="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath(dbDir)
conn.open connStr
Set rs=Server.CreateObject("ADODB.Recordset")
Sub CloseConn()
Set rs=Nothing
conn.close
Set conn=Nothing
End Sub
mydo=request.QueryString("mydo")
If mydo="CheckUser" Then
UserId=Trim(request.QueryString("UserId"))
if UserId="" then
response.Write"ID不能为空!"
response.end
end if
sql="select *from [user] where UserId='"&UserId&"'"
rs.open sql,conn,1,3
if rs.eof then
response.write"succese! 您可以注册"&UserId
else
response.write"false! "&UserId&"已经被别人抢注"
end if
Call CloseConn()
End If
%>
好了ajax用户检测己经做完了.
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17