<%
OpenDB objConn, "xxxx"
Set RSClass = objConn.Execute("select * from class Order by fldClass")
If RSClass.EOF Then
Response.Write "噢,没有记录!
"
Else
Response.Write "
" ONCHANGE=""classselected(this);"" >"
sjavascript = "function classselected(elem){" &_
vbCrlf
"for (var i = document.f1.sort.options.length; i >= 0; i--){"
"document.f1.sort.options[i] = null;"
vbCrlf
Do Until RSClass.EOF
If sLastClass <> RSClass("fldClass") Then
sLastClass = RSClass("fldClass")
Response.Write ""
sjavascript = sjavascript & "}"
"if (elem.options[elem.selectedIndex].value=="
RSClass("fldID") & "){"
End If
sjavascript = sjavascript
"document.f1.sort.options[document."
"f1.sort.options.length] = new Option('"
RSClass("fldSort") & "','" & RSClass("fldID") & "');"
vbCrlf
RSClass.MoveNext
Loop
Response.Write ""
Response.Write "
Response.Write "请选择"
Response.Write ""
sjavascript = sjavascript & "}" & "}"
Response.Write "
Response.Write sjavascript & ""
End If
RSClass.Close
Set RSClass = Nothing
%>