Recently in doing an experiment, computer room reservation system, the first dreamwaver to do the table, very large, and the program has a total of more than 3,000 lines, very inconvenient to manage and modify ~
Recently used the loop and judgment to do an output table, the source program is as follows
<table border= "1" cellspacing= "0" bordercolor= "#006699" >
<%
hang=41 ' Row variable
Lie=9 ' column variable
leirong=blie& "&NBSP" &bhang
For Bhang=1 to hang
Response.Write ("<tr>")
'------------------------------------------------Control Week begins
For blie=1 to lie
If Bhang=1 Then
If Blie=1 Then
Response. Write ("<td colspan=2 width=108>" &weektime& "Week")
Else
If not blie=9 then
Response. Write ("<th width=93>")
Xqnotemp=blie-1
If Xqnotemp=1 then xqno= "one"
If xqnotemp=2 then xqno= "II"
If Xqnotemp=3 then xqno= "three"
If Xqnotemp=4 then xqno= "Four"
If Xqnotemp=5 then xqno= "Five"
If Xqnotemp=6 then xqno= "Six"
If Xqnotemp=7 then xqno= "Day"
Response. Write ("Week" &xqno)
Response.Write ("</th>")
End If
End If
Else
if ((bhang+2) mod 4) =0 and blie=1 Then
Response. Write ("<td rowspan=4>" & (bhang+2)/4& "section")
Response. Write (" ")
Response.Write ("<td>")
Response.Write ("Experiment name")
Response.Write ("</td>")
Else
If not blie=9 then
'------------------------------control the name of the experiment, class, teacher content began
if (not blie=1) and (bhang+2) mod 4=0) Then
Response.Write ("<td rowspan=4>")
Response.Write ("<table><tr>")
Rs.Open "SELECT * from Lesson", conn,1,1
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