<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title><script type="text/javascript"> function closewords() {
var dlnodes = document.getElementsByTagName("dl");
for(var i=0; i<dlnodes.length; i++) {
dlnodes[i].className = "close";
}
}
function showwords(dtnode) {
var dlnode = dtnode.parentNode;
if(dlnode.className == "open"){
dlnode.className = "close";}
else{
closewords();
dlnode.className = "open";}
}
</script>
<style type="text/css">
.open{
overflow:visible;}
dl,.close{
height:16px;
overflow:hidden;}
</style></head><body><dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第一目录</dd>
<dd>第一目录</dd>
<dd>第一目录</dd>
<dd>第一目录</dd>
</dl>
<dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第二目录</dd>
<dd>第二目录</dd>
<dd>第二目录</dd>
<dd>第二目录</dd>
</dl>
<dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第三目录</dd>
<dd>第三目录</dd>
<dd>第三目录</dd>
<dd>第三目录</dd>
</dl>
<dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第四目录</dd>
<dd>第四目录</dd>
<dd>第四目录</dd>
<dd>第四目录</dd>
</dl></body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title><script type="text/javascript"> function closewords() {
var dlnodes = document.getElementsByTagName("dl");
for(var i=0; i<dlnodes.length; i++) {
dlnodes[i].className = "close";
}
}
function showwords(dtnode) {
var dlnode = dtnode.parentNode;
if(dlnode.className == "open"){
dlnode.className = "close";}
else{
closewords();
dlnode.className = "open";}
}
</script>
<style type="text/css">
.open{
overflow:visible;}
dl,.close{
height:16px;
overflow:hidden;}
</style></head><body><dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第一目录</dd>
<dd>第一目录</dd>
<dd>第一目录</dd>
<dd>第一目录</dd>
</dl>
<dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第二目录</dd>
<dd>第二目录</dd>
<dd>第二目录</dd>
<dd>第二目录</dd>
</dl>
<dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第三目录</dd>
<dd>第三目录</dd>
<dd>第三目录</dd>
<dd>第三目录</dd>
</dl>
<dl>
<dt onclick="showwords(this)">目录目录目录目录</dt>
<dd>第四目录</dd>
<dd>第四目录</dd>
<dd>第四目录</dd>
<dd>第四目录</dd>
</dl></body>
</html>
解决方案 »
- 通过JS给视频播放器初始化开始位置。
- 最简单的问题,但就是不知道为什么就是不能正常运行
- 如何删除数组里面多余的重复项?
- 类似csdn结贴的分数显示怎么实现?
- 关于javascript 获取表单中的值的问题 在线等
- 如何用JS获取form get 方式过来参数信息。。
- 关于window.showModelessDialog一个比较麻烦的的问题,你能解决?
- 日期转换问题!!!(昨天问过,但没明白)
- 求助:用javaScript在网页上做一个计数器。谢啦!
- 紧急求助!!js里的history方法属性怎么使用?请详尽一点!!解决就给分,在线等待!!
- 求菜单收缩“中间”效果实现思路
- 请教一个单选按钮+cookie的问题?类似表决
.open{
overflow:visible;
height:100px;
}
.open{
overflow:visible;height:auto;}