使用javascript向下拉列表添加和删除元素 [英] Add and remove elements to a dropdown list using javascript

查看:54
本文介绍了使用javascript向下拉列表添加和删除元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..我有一个下拉列表,其值使用其他下拉列表的值填充.这里的问题是,当第一个值更改时,我需要绑定第二个值.我需要从javascript做到这一点.
我唯一需要做的就是在第一个下拉列表更改时删除并在第二个下拉列表中添加选择选项.
我怎样才能做到这一点?
预先感谢.

Hi.. I have dropdownlist whose value is filled using the value of the other drop down. The problem here is that i need to bind the value of the second when the value of the first changes. I need to do it from the javascript.
Only thing i need to do is remove and add the select options in the second dropdown as the first dropdown changes.
How can i do this?
Thanks in advance.

推荐答案

选中此链接



请参考以下链接:
添加,删除DropDownList中的项目,使用Java脚本的列表框 [ http://asimsajjad.blogspot.in/2008/12/dropdownlist-addremove-item- using.html [ ^ ]
http://chiragrdarji .wordpress.com/2007/06/06/add-items-in-drop-down-list-or-list-box-using-javascript/ [
Hi,
Refer the links below:
Add, Delete Items in DropDownList, ListBox using Javascript[^]
http://asimsajjad.blogspot.in/2008/12/dropdownlist-addremove-item-using.html[^]
http://chiragrdarji.wordpress.com/2007/06/06/add-items-in-drop-down-list-or-list-box-using-javascript/[^]


--Amit


这篇关于使用javascript向下拉列表添加和删除元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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