要使用jquery动态添加下拉列表,请输入文本框值? [英] To enter textbox value dynamically adding dropdown list by using jquery?

查看:343
本文介绍了要使用jquery动态添加下拉列表,请输入文本框值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



输入文本框文本值,使用jquery

hi ,
To enter textbox text value dynamically adding dropdown list by using jquery

推荐答案

动态添加下拉列表



执行以下步骤。



- 使用jquery从文本框中找出文本..喜欢
Hi,

Do following steps.

-- Find out the text from textbox using jquery.. like


('#txtBox')。text()



- 然后创建选项列表的Html标签。您需要创建通用的jquery函数,该函数采用文本框值并将创建以下元素。下拉值将显示为选项列表。所以你可以按如下方式创建html标签。



DisplayTextBoxValue



确保下拉的标签是使用浏览器开发人员工具显示值。取决于标签上方的更改。



- 创建此元素后,您只需使用jquery将其附加到DropDown选项列表。







- SDK
('#txtBox').text()

-- Then create Html tag of option list. You need to create common jquery function which take textbox value and will create following element. Drop down values are get display as option list. So you can create html tag as follows.

DisplayTextBoxValue

Make sure what tag does drop down is showing for values using browser developer tools. Depends on that change above tag.

-- After creating this element you have to just append it to DropDown option list using jquery.



-- SDK


这篇关于要使用jquery动态添加下拉列表,请输入文本框值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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