asp程序代码怎么限制英文和数字组合?请大侠们看以下代码中如何…

2013 年 5 月 7 日4620

小弟在这里跪求
<%@Language=VBScript @CodePage="936"%>
<%
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="Provider=Microsoft.jet.oledb.4.0;data source="& server.MapPath("admin/b76f4ac826295295ace78.asp")
conn.open()
q=replace(trim(request.form("q")),"<","")
w=replace(trim(request.form("w")),"<","")
e=replace(trim(request.form("e")),"<","")
r=replace(trim(request.form("r")),"<","")
t=replace(trim(request.form("t")),"<","")
y=replace(trim(request.form("y")),"<","")
u=replace(trim(request.form("u")),"<","")
i=replace(trim(request.form("i")),"<","")
o=replace(trim(request.form("o")),"<","")
u3=request.ServerVariables("REMOTE_ADDR")
if q=""then
response.Write"<script>window.alert('填写不正确!');history.go(-1);</script>"
response.End()
end if
if w=""then
response.Write"<script>window.alert('填写不正确!');history.go(-1);</script>"
response.End()
end if
set rs=conn.execute("select * from list where q='"&q&"' and w='"&w&"' and e='"&e&"' and r='"&r&"' and t='"&t&"' and y='"&y&"' and u='"&u&"' and i='"&i&"' and o='"&o&"' ")
if rs.eof or rs.bof then
conn.execute "insert into list(q,w,e,r,t,y,u,i,o,ip) values ('"& q &"','"& w &"','"& e &"','"& r &"','"& t &"','"& y &"','"& u &"','"& i &"','"& o &"','"& u3 &"')"
end if
response.Write"<script>alert('提交成功!');window.location.href='/';</script>"
%>

0 0