Dependent <select> menus in HTML and JavaScript

后端 未结 1 1642
有刺的猬
有刺的猬 2020-12-12 07:50

I have two

相关标签:
1条回答
  • 2020-12-12 08:33

    You would need cascading select fields to achieve the desired behavior. This can not be done purely in HTML, and you would need some programming logic in JavaScript to do it as you wish.

    The topic is explained in details in the following links:

    • How to populate a cascading Dropdown with JQuery
    • populate second dropdown based on selected value of first dropdown
    • How to populate second dropdown in $.ajax() depending on value of first dropdown?
    • Populate second select-dropdown based on choice of first select-dropdown and populate the external content below the radiobuttons
    • How does one make a cascading drop-down list in HTML with JavaScript?
    • Javascript Cascading Drop Down Menu With 4 Hierarchical Boxes

    Note: I didn't flag this question as a duplicate because you didn't explicitly mention JavaScript in the question.

    0 讨论(0)
提交回复
热议问题