ASP数据库对齐问题

来源:百度知道 编辑:UC知道 时间:2024/09/20 21:41:46
<td ><%if rs_s("thetype")=1 or rs_s("thetype")=0 then%>|</font> 
<a href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><u><%=rs_s("nclass")%></u></a>
<%end if %>
<%if rs_s("thetype")=2 then%>
<a href="homezx.asp"><u><%=rs_s("nclass")%></u></a>
<%end if %>
<%if rs_s("thetype")=3 then%>
<a href="homezx.asp"><u><%=rs_s("nclass")%></u></a>
<%end if %>
<%rs_s.movenext
if rs_s.eof then
response.write " "
el

你给的代码不全,
你可以在循环里面写上<tr>,另将外面的<td>防到里面来!

改为:
<%do while not rs.eof and not rs.bof%>
<tr><Td>
<%if rs_s("thetype")=1 or rs_s("thetype")=0 then%>|</font>
<a href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><u><%=rs_s("nclass")%></u></a>
<%end if %>
<%if rs_s("thetype")=2 then%>
<a href="homezx.asp"><u><%=rs_s("nclass")%></u></a>
<%end if %>
<%if rs_s("thetype")=3 then%>
<a href="homezx.asp"><u><%=rs_s("nclass")%></u></a>
<%end if %>
</td> </tr>
<%rs_s.movenext
if rs_s.eof then
response.write " "
else
%>