关于ASP表格循环嵌套的问题

2025-05-17 22:15:01
推荐回答(2个)
回答(1):





<%
Dim i=0
do while not rs.eof
i= i+1
%>
<% If i=0 then%>

<% End If %>

<% If i=2 then%>

<% End If %>
<%
rs.movenext
loop
%>










" width="216" height="161" />






<%=rs("title") %>
<%=rs("neirong") %>

回答(2):


    
    
    
    
<%
i=0
do while not rs.eof
if i mod 2=0 then
%>  
 
       
<%
else
%>

<%
end if
%>
            
            
                 " width="216" height="161" />
                
                    
                        
                        <%=rs("title") %>
                        
                        
                        <%=rs("neirong") %>
                        
                    
                        
                
            
        
<%
rs.movenext
i=i+1
if i mod 2=0 then
%>
 
<%
end if
loop
%>
    
       
你测试一下