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.
我想用来自数据库的值填充 html 标签option的标签。如果用户更改另一个标签select的值,我希望发生这种情况。select我使用 php5 和 CodeIgniter 框架。
option
select
我认为您应该寻找AJAX(返回JSON数据)和DOM操作以将元素添加到选择标签。
AJAX
JSON
DOM
您可以使用jQuery来简化 AJAX 调用、操作 DOM 和捕获事件。