您可以在这里快速查找:


 
您的位置: 编程学习 > asp编程 > 200601
文章分类

Java技术
2005: 03 04 05 06 07 08
09 10 11 12
2006: 01 02

Asp.net
2005: 07 08 09 10 11 12
2006: 01 02

VB编程
2006: 02

Asp编程
2005: 11 12
2006: 01 02

C++/VC
2005: 10 11 12
2006: 01 02

Delphi
2005: 12
2006: 01 02

其它

 本文章适合所有读者

vbscript和javascript之间的函数的调用

iuhxq

<%
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&".<span style=""cursor:hand"" onClick=""opener.mkList(´"&rs("mp3url")&"´,´"&rs("mp3name")&"´);"">"&rs("mp3name")&"</span><a href=´"&rs("mp3url")&"´>下载</a><br>"
  rs.movenext
 next
end if
str=vb_escape(str)
response.Write(str)
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<script language="javascript" runat="server">
function vb_escape(str)
{
 return escape(str);
}
function vb_unescape(str)
{
 return unescape(str);
}
</script>