JavaScript实现点击文字链接弹出自定义的下拉列表
兼容性:IE6+ FireFox2+ Opera9+ 更新时间:2009-1-6
简介:本脚本演示了点击文字链接后会在文字链接的下方慢慢拉出一个自定义的列表,可以实现dropdown控件的功能,但是现实效果更佳丰富
This is the content we want to show
This is the content we want to show
This is the content we want to show
This is the content we want to show
This is the content we want to show
This is the content we want to show
Other content
Other content
Other content
Other content
Other content
Other content
Other content
Other content
Other content
Other content
Other content
This is the content of another box
This is the content of another box
This is the content of another box
查看全部代码:查看
代码使用方法:
在网页<head>区添加以下代码在网页<body>区添加以下代码调用方法列表框的内容把你自己的内容放到 <!-- slide down content goes here --> 下方即可
下面是一个内容区的简单范例:
"box1" 是下拉框的ID.
配置可以通过JavaScript函数调整下拉框的出现速度
setSlideDownSpeed(newSpeed) - newSpeed表示速度
你可以通过修改CSS样式表,来修改下拉框的外观
下载:
从本地下载
出处:DHTMLgoodies.com
上一篇:JavaScript打字机效果 下一篇:带滚动条的Div