选择了一级下拉列表框可以正常使用,到了二级到三级下拉列表框就出问题了
VBScript code<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="Connections/conn.asp" --><%Dim Recordset1__MMColParamRecordset1__MMColParam = ""If (Request.Form("select1") <> "") Then Recordset1__MMColParam = Request.Form("select1")end ifDim Recordset2__MMColParamRecordset2__MMColParam = ""If (Request.Form("select2") <> "") Then Recordset2__MMColParam = Request.Form("select2")end ifDim Recordset3__MMColParamRecordset3__MMColParam = ""If (Request.Form("select3") <> "") Then Recordset3__MMColParam = Request.Form("select3")end ifDim Recordset1Dim strSqlDim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_conn_STRINGstrSql="SELECT * FROM 通关手册 "If Recordset1__MMColParam<>""then strSql=strSql & " WHERE 手册编号 = '" & Recordset1__MMColParam & "'"end ifRecordset1.source=strSqlRecordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 1Recordset1.Open()Recordset1_numRows = 0%><%Dim Recordset2Dim Recordset2_numRowsSet Recordset2 = Server.CreateObject("ADODB.Recordset")Recordset2.ActiveConnection = MM_conn_STRINGstrSql="SELECT *FROM 出口成品 "If Recordset1__MMColParam<>""then strSql=strSql & " WHERE 手册编号 = '" & Recordset1__MMColParam & "'"end ifIf Recordset2__MMColParam<>""then strSql=strSql & " WHERE 商品名称 = '" & Recordset2__MMColParam & "'"end ifstrSql=strSql & " ORDER BY 成品ID ASC"Recordset2.source=strSqlRecordset2.CursorType = 0Recordset2.CursorLocation = 2Recordset2.LockType = 1Recordset2.Open()Recordset2_numRows = 0%><%Dim Recordset3Dim Recordset3_numRowsSet Recordset3 = Server.CreateObject("ADODB.Recordset")Recordset3.ActiveConnection = MM_conn_STRINGstrSql="SELECT *FROM 出口制成品及对应进口料件消耗备案清单 "If Recordset1__MMColParam<>""then strSql=strSql & " WHERE 手册编号 = '" & Recordset1__MMColParam & "'"end ifIf Recordset3__MMColParam<>""then strSql=strSql & " WHERE 成品ID = '" & Recordset3__MMColParam & "'"end ifstrSql=strSql & " ORDER BY 成品ID ASC"Recordset3.source=strSqlRecordset3.CursorType = 0Recordset3.CursorLocation = 2Recordset3.LockType = 1Recordset3.Open()Recordset3_numRows = 0%><%Dim Repeat1__numRowsDim Repeat1__indexRepeat1__numRows = -1Repeat1__index = 0Recordset2_numRows = Recordset2_numRows + Repeat1__numRows%><%Dim Repeat2__numRowsDim Repeat2__indexRepeat2__numRows = -1Repeat2__index = 0Recordset3_numRows = Recordset3_numRows + Repeat2__numRows%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><style type="text/css"><!--.STYLE5 {font-size: 14px}.STYLE7 { font-size: 18px; font-family: "楷体_GB2312";}.STYLE8 {font-size: 15px; }--></style></head><body><table width="900" height="50" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#99CCFF"> <tr> <td><div align="center" class="STYLE5">手册编号</div></td> <td><div align="center" class="STYLE5"><%=(Recordset1.Fields.Item("手册编号").Value)%></div></td> <td><div align="center" class="STYLE5">申报日期</div></td> <td><div align="center" class="STYLE5"><%=(Recordset1.Fields.Item("申报日期").Value)%></div></td> <td><div align="center" class="STYLE5">有效日期</div></td> <td><div align="center" class="STYLE5"><%=(Recordset1.Fields.Item("有效日期").Value)%></div></td> </tr> <tr> <td><div align="center" class="STYLE5">企业内部编号</div></td> <td><div align="center" class="STYLE5"><%=(Recordset1.Fields.Item("企业内部编号").Value)%></div></td> <td><div align="center" class="STYLE5">经营单位</div></td> <td><div align="center" class="STYLE5"><%=(Recordset1.Fields.Item("经营单位").Value)%></div></td> <td><div align="center" class="STYLE5">加工单位</div></td> <td><div align="center" class="STYLE5"><%=(Recordset1.Fields.Item("加工单位").Value)%></div></td> </tr></table><br /><span class="STYLE7">出口成品</span><table width="900" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#99CCFF"> <tr> <td width="55"><div align="center" class="STYLE5">成品ID</div></td> <td width="75"><div align="center" class="STYLE5">商品编码</div></td> <td width="75"><div align="center" class="STYLE5">附加编码</div></td> <td width="285"><div align="center" class="STYLE5">商品名称</div></td> <td width="80"><div align="center" class="STYLE5">计量单位</div></td> <td width="100"><div align="center" class="STYLE5">法定计量单位</div></td> <td width="90"><div align="center" class="STYLE5">申报数量</div></td> <td width="90"><div align="center" class="STYLE5">申报单价</div></td> </tr></table><% While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) %> <table width="900" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#99CCFF"> <tr> <td width="55"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("成品ID").Value)%></div></td> <td width="75"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("商品编码").Value)%></div></td> <td width="75"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("附加编码").Value)%></div></td> <td width="285"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("商品名称").Value)%></div></td> <td width="80"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("计量单位").Value)%></div></td> <td width="100"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("法定计量单位").Value)%></div></td> <td width="90"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("申报数量").Value)%></div></td> <td width="90"><div align="center" class="STYLE5"><%=(Recordset2.Fields.Item("申报单价").Value)%></div></td> </tr> </table> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Recordset2.MoveNext()Wend%><br /><span class="STYLE7">出口制成品及对应进口料件消耗备案清单</span><table width="900" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#99CCFF"> <tr> <td width="160"><div align="center" class="STYLE8">成品ID</div></td> <td width="240"><div align="center" class="STYLE8">原料名称</div></td> <td width="238"><div align="center" class="STYLE8">规格型号</div></td> <td width="115"><div align="center" class="STYLE8">单耗</div></td> <td width="115"><div align="center" class="STYLE8">损耗</div></td> </tr></table><% While ((Repeat2__numRows <> 0) AND (NOT Recordset3.EOF)) %> <table width="900" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#99CCFF"> <tr> <td width="160"><div align="center" class="STYLE5"><%=(Recordset3.Fields.Item("成品ID").Value)%></div></td> <td width="240"><div align="center" class="STYLE5"><%=(Recordset3.Fields.Item("原料名称").Value)%></div></td> <td width="238"><div align="center" class="STYLE5"><%=(Recordset3.Fields.Item("规格型号").Value)%></div></td> <td width="115"><div align="center" class="STYLE5"><%=(Recordset3.Fields.Item("单耗率").Value)%></div></td> <td width="115"><div align="center" class="STYLE5"><%=(Recordset3.Fields.Item("损耗率").Value)%></div></td> </tr> </table> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 Recordset3.MoveNext()Wend%></body></html><%Recordset1.Close()Set Recordset1 = Nothing%><%Recordset2.Close()Set Recordset2 = Nothing%><%Recordset3.Close()Set Recordset3 = Nothing%>