populate select from other select value using jquery(使用 jquery 从其他选择值中填充选择)
问题描述
大家好,我看到了很多问题,但没有一个能满足我的渴望.我想在另一个选择的基础上填充选择.我正在使用 zend 框架.我有一个选择,它将选择一个帐户,并根据所选的 id 我想用基于第一个选择的选项从数据库中获取的值填充其他选择.我先选择是这样的
<前><选择名称='选择1'><option value='1'>accoutn1</option><option value='4'>accoutn4</option>选择>现在我想要的是在第一个选择的基础上,另一个选择是使用 jquery 填充的.选项将是基于第一个选定值从数据库中获取的值.我的另一个选择是
<前><选择名称='客户'>选择>jquery 的哪个函数支持这一点,我可以根据所选选项从数据库中获取值并填充其他选择.我正在使用 zendframe 工作.任何的想法?
如果你使用 jQuery 你可以使用这个 插件
演示和用法显示在此处
hi all I have seen many question but no one has fulfilled my thirst. I want to populate select on the basis of one other select. I am using zend framework. I have a select that will select a account and on the basis of that selected id i want to populate other select with values fetched from database based on first selected option. I have first select which is like this
<select name='select1'> <option value='1'>accoutn1</option> <option value='2'>accoutn2</option> <option value='3'>accoutn3</option> <option value='4'>accoutn4</option> </select>
Now what I want that on the basis of first select, the other other select is populated using jquery. The options will be values fetched from database on the basis of first selected value. my other select is
<select name='client'> </select>
Which function of jquery supports this that I can fetched values from database on the basisi of selected option and populate other select. I am using zendframe work. Any idea?
If you are using jQuery you can use this plugin
Demonstration and usage shown here
这篇关于使用 jquery 从其他选择值中填充选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 jquery 从其他选择值中填充选择


基础教程推荐
- 使用 PDO 转义列名 2021-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- HTTP 与 FTP 上传 2021-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- PHP 守护进程/worker 环境 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01