简体   繁体   English

对于从下拉框中选择的特定值,在下拉列表中显示其对应的值?

[英]For a particular selected value from a drop-down box, Display its corresponding values in drop down list?

I have two fields in a webpage. 我在网页中有两个字段。 Both are composite primary keys. 两者都是复合主键。 Out of that when I select one field (eg. out of a list of countries I select - India), the second field should display all the values corresponding to the previous field (eg. after selecting India I should get all the states in another drop-down menu). 除此之外,当我选择一个字段时(例如,从我选择的国家列表中),第二个字段应显示与上一个字段相对应的所有值(例如,选择印度后,我应获取另一个州的所有州)下拉式菜单)。

I'm implementing this using JSP and Ajax. 我正在使用JSP和Ajax实现它。

Can someone please help me with this or send me the code snippets.? 有人可以帮我解决这个问题或向我发送代码段吗?

Neal, There are various codes available like this. 尼尔,有各种可用的代码,例如这样。 Just do googling. 刚进行谷歌搜索。 Try with link 尝试链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 根据在另一个下拉菜单中选择的值启用和选择下拉菜单的值 - Enable and select values of Drop-down based on the value selected in another Drop-down 无法从下拉菜单访问选定的值 - Can't access selected value from drop-down menu 从下拉列表传递的空值 - Null value passed from drop-down list 如何显示一个表中下拉框的第一个值和另一个表中相同下拉列表的其他值 - How can I display first value of drop down box from one table and other values of same drop down from another table 从下拉菜单中选择的选项将填充另一个文本框/下拉值 - selected option from drop down fills another text box/drop down value value 如何在android下面的特定视图下方显示下拉列表视图? - How to display drop-down list-view below particular view in android? Struts 2在下拉菜单中选择框显示值 - Struts 2 Select Box Display Values in Drop Down 在下拉列表中显示从数据库中选择的数据 - Display Selected Data from database in drop down list 在jsp页面中显示下拉列表的选定值 - display selected value of the drop down in jsp page 该元素是从下拉菜单中选择的,而不是从jQ​​uery中选择的 - the element is selected from drop-down menu but not from jQuery
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM