下载OnChange的JAVASCRIPT [英] JAVASCRIPT for Drop Down OnChange

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

问题描述




我非常喜欢JavaScript。请帮助解决这个问题。


这里的例子是

http://www.javascriptkit.com/script/script2/flipmenu。 shtml

有两个文件夹:JavaScript资源和Web资源。


我希望它们是下拉选项,并根据选择相应的列表应该显示下来,就像我从下拉列表中选择JavaScript一样。

所有的链接,如JavaScript工具包,免费JavaScripts等等都应该被调到下拉列表。


是否有可能。


问候,

Siva

Hi,

I am very much new to JavaScript. Please, can anyone help in resolving this issue.

Here in the example
http://www.javascriptkit.com/script/script2/flipmenu.shtml
There are two folders: JavaScript Resources and Web Resources.

I want them to be options for drop down, and depending on the selection the corresponding lists should b displayed down, like if i select JavaScript from the drop down.
All the links like JavaScript kit, Free JavaScripts...etc should be displed down to the drop down.

Is it possible.

Regards,
Siva

推荐答案

嗨...


据我所知:你想要2个下拉菜单... 1个含2个类别(js,webres)......还有一个取决于选择第一个并显示该类别的不同子项?


您有不同的可能性:创建2个显示/隐藏的选择框(设置样式显示y:none / block)当你从第一个中选择一个值时......或者根据你的选择动态创建选项(用dom-methods)...


亲切的问候
hi ...

as far as i understand: you want 2 dropdowns ... 1 with the 2 categories (js, webres) ... and one that depends on the selection of the first and shows different subitems of the category?

you have different possibilities for that: create 2 select-boxes that are displayed/hidden (set the style display: none/block) when you select a value from the first one ... or dynamically create the options dependent to your selection (with dom-methods) ...

kind regards



嗨...


据我了解:你想要2个下拉菜单。 .. 1有2个类别(js,webres)......还有一个取决于第一个类别的选择并显示该类别的不同子项目?


你有不同的可能性:创建2个显示/隐藏的选择框(设置样式显示:无/块)当您从第一个选择一个值时...或动态创建依赖于您的选择的选项(使用dom-methods)。 ..


亲切的问候
hi ...

as far as i understand: you want 2 dropdowns ... 1 with the 2 categories (js, webres) ... and one that depends on the selection of the first and shows different subitems of the category?

you have different possibilities for that: create 2 select-boxes that are displayed/hidden (set the style display: none/block) when you select a value from the first one ... or dynamically create the options dependent to your selection (with dom-methods) ...

kind regards



谢谢Gits的回复。


我想要第一个下拉肯定,但第二个应该保留在列表结构中,与显示的示例中的相同。我也非常喜欢JavaScript。如果有可能请告诉我。


问候,

Siva


Thanks Gits for ur reply.

I want the first drop down for sure, but the second should remain in the list structure, same as it was in the shown example. Also i am very much new to JavaScript. PLease let me know if it is possible.

Regards,
Siva


当然有可能..简单的方法是:


为列表创建两个div容器并使用我上面提到的set样式方法...在你的选择的更改中你调用一个方法来切换可见性相应的div ...


亲切的问候
of course it is possible ... the simple way is:

create two div-containers for the lists and use the set style method i mentioned above ... onchange of your selection you call a method that toggles the visibilty of the corresponding div ...

kind regards


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

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