• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    如何制作关联的下拉菜单?

    form name=f1 METHOD="POST">

    %

    OpenDB objConn, "xxxx"

    Set RSClass = objConn.Execute("select * from class Order by fldClass")

    If RSClass.EOF Then

    Response.Write ",没有记录!BR>"

    Else

    Response.Write "select NAME=""class"" style=""FONT-SIZE: 9pt"" SIZE=10"

    " 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 "OPTION VALUE=" RSClass("fldID") ">" sLastClass "/OPTION>"

    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 "/select>"

    Response.Write "select NAME=""sort"" style=""FONT-SIZE: 9pt"" SIZE=10>"

    Response.Write "OPTION>请选择/OPTION>"

    Response.Write "/select>"

     

    sjavascript = sjavascript  "}"  "}"

     

    Response.Write "SCR" "IPT LANGUAGE=""javascript"">"

    Response.Write sjavascript  "/SCR" "IPT>"

     

    End If

    RSClass.Close

    Set RSClass = Nothing

    %>

    /form>

     

    上一篇:如何在读取Excel文件时创建列表的下拉菜单?
    下一篇:如何测试字符串的长度?
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    如何制作关联的下拉菜单? 如何,制作,关联,的,下拉菜单,