jQuery: change selectable dropdown options based on radio button selection

后端 未结 3 597
日久生厌
日久生厌 2020-12-12 03:36

I have a php web form, when user selects a radio button, I want only certain options to be available in the dropdown. So for example, if I select House fro

3条回答
  •  清歌不尽
    2020-12-12 03:51

    Simplest way is just assign css classes to the select options and show/hide them.

    Demo: http://jsfiddle.net/9Tbpq/

    Group box House
    Condo
    Boat


    Group Options

    .

    
    

提交回复
热议问题