<% 
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select top "&rs_parameter("ex_amount")&" * from "&web_dbtop&"shop where ex_index = 1 Order by id desc"
rs.Open sql,conn,1,1
 %>
<script type="text/javascript">
function zAlert(){
 var diag = new Dialog("Diag1");
  diag.Width = 900;
 diag.Height = 400;
 diag.Title = "号码详情";
 diag.URL = "http://localhost/网站/content.asp?id=<%= rs("id") %>";
 diag.OKEvent = zAlert;//点击确定后调用的方法
  diag.show();
}
</script> 
 diag.URL = "http://localhost/网站/content.asp?id=<%= rs("id") %>";这句话怎么循环出来?

解决方案 »

  1.   

    循环出来是什么意思?
    现在是否rs("id")这个值获取不到?
    你加个script runat="server"看看
      

  2.   

    就是怎么循环出
    diag.URL = "http://localhost/网站/content.asp?id=<%= rs("id") %>";
    这句,因为数据库里面还有别条id,要把数据库里面的都循环出来,不然只有一条。就是循环出来的语句在JS中不知道怎么写
      

  3.   

    do until rs.eof
    response.write rs("id")
    rs.movenext
    loop
    你说的是不是这个循环?