<!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=utf-8" />
<title>sample</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function onclickChange(obj,index){
document.getElementById(obj).style.fontWeight='bold';
document.getElementById(obj).style.color='#D07B02';
for(i=1; i<=6; i++){
if(i != index){
document.getElementById('tar'+i).style.fontWeight='';
document.getElementById('tar'+i).style.color='#000000';
}
}
}
//-->
</SCRIPT>
<style type="text/css">
* {
margin:0;
padding:0;
list-style:none;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
margin:2px;
}
a:link {
color: #000000;
text-decoration: none
}
a:visited {
color: #000000;
text-decoration: none
}
a:hover {
color: #000000;
text-decoration: underline;
}
#basic-accordian{
border:1px solid #a5a576; 边框颜色
padding:5px;
width:170px;
position:absolute;
left:50%;
top:50%;
margin-left:-175px;
z-index:2;
margin-top:-100px;
}
.accordion_headings{
padding:5px;
background:#ffe89c;
color:#010102;
border:1px solid #a5a576;
cursor:pointer;
font-weight:bold;
}
.accordion_headings:hover{
background:#feb24b;
}
.accordion_child{
padding:8px;
background:#ffffe7;
}
.header_highlight{
background:#feb24b;
}
</style>
<script type="text/javascript" src="accordian.pack.js"></script>
</head>
<body onload="new Accordian('basic-accordian',5,'header_highlight');" topmargin="0">
<div id="basic-accordian" style="left: 180px; top: 104px" >
<!--Parent of the Accordion-->
<!--Start of each accordion item-->
<div id="test-header" class="accordion_headings header_highlight" >Home</div><!--Heading of the accordion ( clicked to show n hide ) -->
<!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
<div id="test-content"><!--DIV which show/hide on click of header-->
<!--This DIV is for inline styling like padding...-->
<div class="accordion_child">
<a href="#" onclick="onclickChange('tar1',1)"><font id="tar1">Content1</font></a>
<br><br>
<a href="#" onclick="onclickChange('tar2',2)"><font id="tar2">Content2</font></a>
</div>
</div>
<!--End of each accordion item-->
<!--Start of each accordion item-->
<div id="test1-header" class="accordion_headings" >About Us</div><!--Heading of the accordion ( clicked to show n hide ) -->
<!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
<div id="test1-content"><!--DIV which show/hide on click of header-->
<!--This DIV is for inline styling like padding...-->
<div class="accordion_child">
<a href="#" onclick="onclickChange('tar3',3)"><font id="tar3">Content1</font></a>
<br><br>
<a href="#" onclick="onclickChange('tar4',4)"><font id="tar4">Content2</font></a>
</div>
</div>
<!--End of each accordion item-->
<!--Start of each accordion item-->
<div id="test2-header" class="accordion_headings" >Downloads</div><!--Heading of the accordion ( clicked to show n hide ) -->
<!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
<div id="test2-content"><!--DIV which show/hide on click of header-->
<!--This DIV is for inline styling like padding...-->
<div class="accordion_child">
<a href="#" onclick="onclickChange('tar5',5)"><font id="tar5">Content1</font></a>
<br><br>
<a href="#" onclick="onclickChange('tar6',6)"><font id="tar6">Content2</font></a>
</div>
</div>
<!--End of each accordion item-->
</div><!--End of accordion parent-->
</body>
</html>
分享到:
相关推荐
JSP自定义标签(一)_树形下拉选择菜单
layui使用tree完美整合树形下拉菜单,实例已实现初始化下拉列表、动态赋值、获取选中值等功能,一看就懂,下载即用!
layui使用tree完美整合树形下拉菜单,实例已实现初始化下拉列表、动态赋值、获取选中值等功能,一看就懂,下载即用!
不错的jquery树形下拉菜单,在此跟大家分享一下。希望提出宝贵意见……
树形下拉菜.vi 一个LabVIEW的小程序
三级树形下拉菜单,树形菜单javascript特效
树形下拉列表 递归实现 包含有 sql server 数据库脚本
最新项目需求要求做一个三级下拉菜单列表(树形下拉菜单)。但UGUI并没有原生的插件,只能自己实现。思路每个级的ItemPanel(一个单级菜单条)样式是一样的,于是需要一个panel来装所有的itemPanel,在整个菜单 顶部...
C#树形下拉列表控件 非常好用的 完全源代码 C#树形下拉列表控件 非常好用的 完全源代码 C#树形下拉列表控件 非常好用的 完全源代码 C#树形下拉列表控件 非常好用的 完全源代码
一款点击弹出式的jQuery树形下拉列表选择框代码,数据封装在demoData.js里面,可以自由添加修改。
本项目是基于Layui和ZTree的树形下拉选择器设计源码,包含118个文件,其中75个GIF文件,24个JavaScript文件,6个CSS文件。该系统是一个基于layui和ztree的树形下拉选择器,提供了丰富的功能,包括异步加载、点击回调...
最简单树形下拉菜单,可以自己添加样式,鼠标滑过展示 滑出自动收起。非常简单,无jquery
用jsTree+div模拟 js树形下拉菜单
jQuery实现多级手风琴树形下拉菜单,随意添加多级菜单,非常流行的样式哦,简单易用,带动画滑动,没有其他三方控件。
基于bootstrap的树形下拉列表控件
树形下拉列表框 提供选择和展开
非常棒的树形下拉组件,一个下拉框可以弹出树形结构。支持可编辑,支持ajax加载数据。适合组织机构的选择。更多组件下载请访问:http://www.quickui.net/
带弹性的树形下拉菜单
MFC Windows 程序设计之树形下拉列表框,适合初学MFC的小伙伴学习研究,博客中有对应的讲解和演示,避免走弯路,费时费力。也真心希望能够帮助正在苦学MFC Windows 程序设计的小伙伴们,你们的成长是我最大的幸福。