How to limit options in a <select> based on another option selection

前端 未结 3 1649
盖世英雄少女心
盖世英雄少女心 2021-01-16 09:29

I\'m trying to limit the number of options based on another selection. For instance in this example \"How many credits is the class you skipped?\" should be limited to equal

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-16 09:45

    If you want the drop-down list for a question to change based on previous answer, you need to add an onchange event to each select element which would update another drop-down. This should then call a function which removes or adds elements in your form.

    Otherwise, you can add a validation function for your Calculate button.

提交回复
热议问题