vbscript和javascript之间的函数的调用

<%
server1=cstr(request.servervariables("http_referer"))
server2=cstr(request.servervariables("server_name"))
if mid(server1,8,len(server2))<>server2 then
 response.end()
end if
keyword=vb_unescape(request("keyword"))
keyword=replace(keyword,"'","''")
set conn=server.createobject("ADODB.CONNECTION")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../***")
conn.open connstr

str=""
set rs=conn.execute("select top 25 * from mp3 where mp3name like '%"&keyword&"%' order by len(mp3name)")
if rs.eof and rs.bof then
 response.Write("没有找到")
else
 i=1
 for i=1 to 25
  if rs.eof then exit for
  str=str&i&"."&rs("mp3name")&"下载
"
  rs.movenext
 next
end if
str=vb_escape(str)
response.Write(str)
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

你可能感兴趣的:(ASP)