您的位置:程序门 -> web 开发 -> asp



asp循环问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


asp循环问题
发表于:2007-01-08 10:06:25 楼主
我想循环

  <tr>
                <td> <div   align= "center "> <%=rs0( "person_cname ")%> </div> </td>
                <td> <div   align= "center "> <%=rs0( "dept_code ")%> </div> </td>
            </tr>

这段代码     怎么写循环语句       下面是整个代码    
<!--#include   file= "inc/xconn.asp "-->
<!doctype   html   public   "-//w3c//dtd   html   4.01   transitional//en "   "http://www.w3.org/tr/html4/loose.dtd ">
<html>
<head>
<meta   http-equiv= "content-type "   content= "text/html;   charset=gb2312 ">
<title> 无标题文档 </title>
<style   type= "text/css ">
<!--
.style1   {color:   #ffffff;
font-size:   14px;
font-weight:   bold;
font-family:   "宋体 ";
}
-->
</style>
<link   href= "css.css "   rel= "stylesheet "   type= "text/css ">
</head>

<body>
<p>
    <%

sql= "select   *   from   t_dept_person   where   market_code= '青岛 ' "
set   rs0=server.createobject( "adodb.recordset ")
rs0.open   sql,conn,1,1
%>
</p>
<table   width= "750 "   height= "25 "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
    <tr>
        <td   background= "images/788.gif "> <div   align= "center "   class= "style1 "> 通   知   管
                理 </div> </td>
    </tr>
</table>
<table   width= "750 "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "1 "   bgcolor= "#5aae18 ">
    <tr>
        <td   bgcolor= "#ffffff "> <table   width= "100% "     border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
            <tr>
                <td> <div   align= "center "> 姓   &nbsp;名: </div> </td>
                <td> <div   align= "center "> 所在部门 </div> </td>
            </tr>
            <tr>
                <td> <div   align= "center "> <%=rs0( "person_cname ")%> </div> </td>
                <td> <div   align= "center "> <%=rs0( "dept_code ")%> </div> </td>
            </tr>
        </table> </td>
    </tr>
</table>
</body>
</html>


快速检索

最新资讯