ตอนนี้ฉันรู้สึกลำบากจริงๆ ง่ายต่อไปนี้เพียงพอหรือไม่?
การคัดลอกรหัสมีดังนี้:
-
Dimi, J, Icols
i = 0 '// กำหนด i สำหรับลูป
ICOLS = 3 '// มีคอลัมน์กี่คอลัมน์ในแถว (จำนวนเต็มบวก)
response.write ("<tablewidth =" "100%" "border =" "1" "cellspacing =" "2" "cellpadding =" "0" "> <tr>" & vbNewline) '
dowhilenotors.eof '// เริ่มต้นบันทึกเอาท์พุทที่มี forors.recordcountnext, ตกลงเช่นกัน
ifi> 0andimodicols = 0thenResponse.write ("</tr> <tr>" & vbNewline) '// ถ้าจำนวนคอลัมน์เท่ากับการแบ่งบรรทัด ICOLS
i = i+1
response.write ("<tdwidth =" "" & formatpercent (1/icols, 0) & "" "> output" & i & "Record </td>" & vbNewline)
ors.movenext
ลูป '// สิ้นสุดชุดบันทึกเอาต์พุต
ors.close
forj = 1toicols-1 '// เริ่มแต่งหน้าสำหรับบันทึกที่ว่างเปล่าและสูงสุด 1 icols-1
ifimodicols = 0thenexitfor '// จำนวนคอลัมน์มีค่าเพียงพอที่จะไม่ส่งออกอีกต่อไป
i = i+1
Response.write ("<tdwidth =" "" & formatpercent (1/icols, 0) & "" "> กรอกใน" & j & "Record </td>" & vbNewline)
ต่อไป
Response.write ("</tr> </table>" & vbNewline) '// หางตารางเอาท์พุท
-