双体循环.主要用来显示分层TABLE.

 1        <%
 2        dim arrDispField(1,11)
 3        arrDispField(0,0= "Name"
 4        arrDispField(1,0= dfShowML("Name")
 5        arrDispField(0,1= "Sex"
 6        arrDispField(1,1= dfShowML("Sex")
 7        arrDispField(0,2= "Birth_Date"
 8        arrDispField(1,2= dfShowML("Birth_Date")
 9        arrDispField(0,3= "Education_Id"
10        arrDispField(1,3= dfShowML("Education")
11        arrDispField(0,4= "Origin_Id"
12        arrDispField(1,4= dfShowML("Origin")
13        arrDispField(0,5= "IDCard_NO"
14        arrDispField(1,5= dfShowML("IDCard_NO")
15        arrDispField(0,6= "Date_OnBoard"
16        arrDispField(1,6= dfShowML("Date_OnBoard")
17        arrDispField(0,7= "Department_Id"
18        arrDispField(1,7= dfShowML("Department")
19        arrDispField(0,8= "Post"
20        arrDispField(1,8= dfShowML("Post")
21        arrDispField(0,9= "Status_Id"
22        arrDispField(1,9= dfShowML("User_Status")
23        arrDispField(0,10= "Married_Id"
24        arrDispField(1,10= dfShowML("Married")
25        arrDispField(0,11= "Household_Location"
26        arrDispField(1,11= dfShowML("Household_Location")
27
28        fieldsOfLine = 4
29        for mDispField = lbound(arrDispField,2to ubound(arrDispField,2)
30            %><tr class=shade><%
31            for xLine = 1 to fieldsOfLine
32                if mDispField>ubound(arrDispField,2then 
33                    for xMinus = 0 to fieldsOfLine-xLine
34                        Response.Write "<Td></Td>"
35                    next
36                    exit for
37                end if
38                    'response.write mDispField & "<--" & arrDispField(1,mDispField) & vbTab
39                %>
40                    <td nowrap><%=BuildEditControl("MM", arrDispField(0,mDispField), "CHECKBOX", arrDispField(1,mDispField), "")%></td>
41                <%
42                mDispField = mDispField +1
43            next
44            %></tr><%
45            response.write "<br>"
46            if mDispField>ubound(arrDispField,2then exit for
47            mDispField = mDispField -1
48        next
49        %>
posted @ 2005-04-27 00:24  Benny Ng  阅读(415)  评论(0编辑  收藏  举报