Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每件衬衫样品都有三个下拉菜单;产品、颜色和等级。并非所有产品都提供所有颜色和/或等级。我想根据用户的选择禁用不可用的选项。
我试过在这里使用这个答案(使用单选)。不幸的是,我无法让它与选项选择的输入一起使用。
这就是我正在做的事情 - quartus.ca/select-options.html
任何指导将不胜感激。
您需要根据自己的业务逻辑,在每次更改时动态清除并重新插入 OPTION。您不能简单地禁用<SELECT>.
<SELECT>