使用Ajax从PHP / MySQL填充的6个下拉框 [英] 6 dropdown boxes populated from PHP/MySQL using Ajax

查看:57
本文介绍了使用Ajax从PHP / MySQL填充的6个下拉框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i想要使用下拉框来填充另一个下拉框等等但我想保持所有数据adt是从d previoce框中选择的,我不想使用提交按钮但是下拉必须将这些变化分成几个因为它的价值gange


可以任何人hlp

hi
i want to use a dropdown box to populate another dropdownbox and so on but i want to maitain all the data adt was selected from d previoce box and i dnt want to make use of submit button but the dropdown must triger the changes assoon as its value gange

can anyone hlp

推荐答案

曾经想过使用JavaScript那?当然不是PHP。


Ronald:很酷:
Ever thought of using JavaScript for that? Certainly not PHP.

Ronald :cool:



曾经想过用JavaScript ?当然不是PHP。


Ronald:很酷:
Ever thought of using JavaScript for that? Certainly not PHP.

Ronald :cool:



我怎么去做dat

hi how can i go about doing dat


您希望在哪里填充下拉框?


来自程序或服务器数据库中存储的数据?

这有很大的不同,因为在第一种情况下你只需触发一个填充另一个盒子的JS例程。


在第二种情况下,你让触发的JS例程生成与服务器联系以获取数据(使用Ajax)然后让它填充下一个下拉列表。


这两个选项都是一个解决方案。


罗纳德:酷:
Where do you want your dropdown box to be populated from?

From data that is stored in your program or from a server database?

That makes a big difference, because in the first case you simply trigger a JS routine that fills another box.

In the second case you let the triggered JS routine make contact with the server to get the data (using Ajax) and then let that populate the next dropdown.

For both options is a solution.

Ronald :cool:


这篇关于使用Ajax从PHP / MySQL填充的6个下拉框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆