弄了个网址导航程序,我想输入同样的域名,但不让输入,应该怎么修改代码?
下面是代码:
if url<>"" then
dim domain
domain = mid(url,8)
if instr(domain,"/")>0 then
domain = left(domain,instr(domain,"/"))
end if
set rs=server.createobject("adodb.recordset")
sql="select * from detail where url like '%"&domain&"%'"
rs.open sql,conn,1,1
if not(rs.eof or rs.bof) then
Response.Write ("<script language=javascript>alert('抱歉,此域名已经存在!');this.location.href='login.asp';</script>")
response.end
rs.close
set rs=nothing
end if
end if