如何循环弹出数据库中的地址

shijian58 2005-06-03 03:24:37
我想将数据库中的地址连接随机弹出,怎么用了好几种方法都不行呢。
要求:数据库中有连接1、2、3。每次打开页面随机打开其中的2个连接。也就是在IE中打开两个窗口
...全文
65 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
CharleneChoi 2005-06-03
  • 打赏
  • 举报
回复
学习
iuhxq 2005-06-03
  • 打赏
  • 举报
回复
学习
bluemoon0001 2005-06-03
  • 打赏
  • 举报
回复
<% while not rs.eof %>
<script language=javascript>
window.open("<%=rs("网址")%>","","location=no toolbar=no,scrollbars=yes,menubar=no,resizable=yes,width=470,height=380,left=200,top=200,status=no");
</script>
<%
rs.movenext
wend
%>

注意:window.open的第二个参数为空,或用不同的名字,不能用相同的名字,不然你只能弹出一个窗口。
bluemoon0001 2005-06-03
  • 打赏
  • 举报
回复
Sql server:

select top 2 * from 表 order by newid()

Access:

SELECT top 2 * FROM 表 ORDER BY Rnd(id)
shijian58 2005-06-03
  • 打赏
  • 举报
回复
如何弹开啊,用window:open怎么不行呢
chjpeng 2005-06-03
  • 打赏
  • 举报
回复
select top 2 * from [table] order by newid()

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧