文件名称:常用的JS后台导航菜单,可刷新不变
文件大小:7KB
文件格式:HTM
更新时间:2015-03-17 10:23:44
JS 后台 导航 菜单
常用的JS后台导航菜单,可刷新不变
<html xml:lang="UTF-8" lang="UTF-8">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="UTF-8" />
<title>后台管理</title>
<style type="text/css">
body {margin:0;text-align:center;color:#000;font:normal 12px Arial,Verdana,Tahoma;text-align:center;background:#C8D0D5;line-height:150%;}
a:link,a:visited {color:#385065;text-decoration:none}
a:hover {text-decoration:underline}
#menu {width:150px;margin:0px 15px;padding:0px;text-align:left;list-style:none}
#menu .item {margin:5px 0px;padding:0px;list-style:none}
a.title:link, a.title:visited, a.title:hover {display:block;background:url(http://www.tblog.com.cn/attachments/month_0609/m20069110491.gif) no-repeat;color:#385065;font-weight:bold;padding:2px 0 0 22px;width:128px;line-height:23px;cursor:pointer;text-decoration:none}
#menu .item ul {border:1px solid #9FACB7;margin:0;width:118px;padding:3px 0px 3px 30px;background:#fff;list-style:none;display:none}
#menu .item ul li {display:block;}
</style>
[removed]
// --- 获取ClassName
document.getElementsByClassName = function(cl) {
var retnode = [];
var myclass = new RegExp('\\b'+cl+'\\b');
var elem = this.getElementsByTagName('*');
for (var j = 0; j < elem.length; j++) {
var classes = elem[j].className;
if (myclass.test(classes)) retnode.push(elem[j]);
}
return retnode;
}
// --- 隐藏所有
function HideAll() {
var items = document.getElementsByClassName("optiton");
for (var j=0; j