从另一个更新一个列表

I have two multi-select lists in HTML - one of categories, and another of items. What I want is that, when an item selected in the "category" list, everything in the "items" list from that category is also selected.

For example, if "Categories" contains "Animal", "Mineral", and "Vegetable", and "Items" contains "Dog", "Cat", "Monkey", "Diamond", "Granite", "Carrot", "Tomato":

If "Animal" is selected in one list, "Dog", "Cat", and "Monkey" should be selected; any other selections should remain as they are.

I'm using a Symfony PHP backend on the server, if that makes any difference

查看全部
weixin_33738982
?Briella
2010/05/20 22:44
  • html
  • ajax
  • javascript
  • 点赞
  • 收藏
  • 回答
    私信

1个回复