下拉列表的Javascript [英] Javascript for Dropdown List

查看:61
本文介绍了下拉列表的Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



基于所选文本的下拉列表,我想更改文本框的显示模式.如果所选文本为新建",则将文本框的显示模式更改为"display:block",否则更改为"display:none".

请给我JavaScript代码.

预先感谢.

Hi,

Based on the dropdown list selected text, i want to change the display mode of a textbox. If the selected text is "New", change the textbox display mode as "display:block" , else "display:none".

Please give me the javascript code.

Thanks in advance.

推荐答案

看看这个答案:
http://www.codeproject.com/Answers/90154/how-to-hide-div-using-java-script.aspx [
Have a look at this answer:
http://www.codeproject.com/Answers/90154/how-to-hide-div-using-java-script.aspx[^]

Implement something similar, just use dropdown ''onchage'' event in your code instead of treenode click.


这篇关于下拉列表的Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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