Answers to questions about ASP cyclic tables [more detailed]_ application tips

Source: Internet
Author: User
The following is the code, if you do not understand, we suggest that the form of some of the <tr><td> table principles are clear, you can
Copy Code code as follows:

<table border= "0" cellpadding= "0" cellspacing= "0" >
<%
Dim Rs,sqltext
Set rs = Server.CreateObject ("Adodb.recordset")
sqltext= "SELECT * from [Bigclass]"
Rs. The Open sqltext,conn,1,1
m=1
colzs=5 ' line shows 5 columns
if Rs. RecordCount MoD colzs=0 then
Rowzs=int (Rs. Recordcount/colzs)
Else
Rowzs=int (Rs. RECORDCOUNT/COLZS) +1
End If
for j = 1 to rowzs%>
<tr>
<%for i = 1 to colzs%>
<%if not Rs. EOF then%>
<td><input type= "checkbox" Name= "qxflag<%=m%>" value= "1" ><%=trim (RS ("Bigname )%></td>
<%
Rs. MoveNext
m = m + 1
Else
%>
<td>  </td>
<%end if%>
<%next% >
</tr>
<%
Next
Rs. Close
Set rs = Nothing
%>
</table>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.