populate dropdown on selection of other dropdown

前端 未结 4 622
一整个雨季
一整个雨季 2020-12-12 05:32

I have two drop-down boxes. I want to populate second drop-down box on selection in the first drop-down box. My values are retrieving from database. Is this possible withou

4条回答
  •  醉话见心
    2020-12-12 05:41

    You could do it either way. If you dont want to use ajax, just load every single option into an object. Then when you select something from select #1, populate #2 with the assoicated array of data from your object.

    If I were doing it, I wouldn't do it with ajax unless there was a TON of data.

提交回复
热议问题