問題描述
大家好,我看到了很多問題,但沒有一個能滿足我的渴望.我想在另一個選擇的基礎上填充選擇.我正在使用 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 從其他選擇值中填充選擇的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!