仿qq下拉表
來(lái)源:易賢網(wǎng) 閱讀:894 次 日期:2014-10-09 12:12:26
溫馨提示:易賢網(wǎng)小編為您整理了“仿qq下拉表”,方便廣大網(wǎng)友查閱!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" 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>后臺(tái)管理</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(<a href="/Upfiles/BeyondPic/2008-03/20083250264119367.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>

<script language="javascript" type="text/javascript">

// --- 獲取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<items.length; j++) {

items[j].style.display = "none";

}

}

// --- 設(shè)置cookie

function setCookie(sName,sValue,expireHours) {

var cookieString = sName + "=" + escape(sValue);

//;判斷是否設(shè)置過(guò)期時(shí)間

if (expireHours>0) {

var date = new Date();

date.setTime(date.getTime + expireHours * 3600 * 1000);

cookieString = cookieString + "; expire=" + date.toGMTString();

}

document.cookie = cookieString;

}

//--- 獲取cookie

function getCookie(sName) {

var aCookie = document.cookie.split("; ");

for (var j=0; j < aCookie.length; j++){

var aCrumb = aCookie[j].split("=");

if (escape(sName) == aCrumb[0])

return unescape(aCrumb[1]);

}

return null;

}

window.onload = function() {

var show_item = "opt_1";

if (getCookie("show_item") != null) {

show_item= "opt_" + getCookie("show_item");

}

document.getElementById(show_item).style.display = "block";

var items = document.getElementsByClassName("title");

for (var j=0; j<items.length; j++) {

items[j].onclick = function() {

var o = document.getElementById("opt_" + this.name);

if (o.style.display != "block") {

HideAll();

o.style.display = "block";

setCookie("show_item",this.name);

}

else {

o.style.display = "none";

}

}

}

}

</script>

</head>

<body>

<ul id="menu">

<li class="item"><a href="javascript:void(0)" class="title" name="1">仿qq下拉表1</a>

<ul id="opt_1" class="optiton">

<li><a href="#">仿qq下拉表2</a></li>

<li><a href="#">仿qq下拉表3</a></li>

</ul>

</li>

<li class="item"><a href="javascript:void(0)" class="title" name="2">仿qq下拉表4</a>

<ul id="opt_2" class="optiton">

<li><a href="#">仿qq下拉表5</a></li>

<li><a href="#">仿qq下拉表</a></li>

</ul>

</li>

<li class="item"><a href="javascript:void(0)" class="title" name="3">仿qq下拉表4</a>

<ul id="opt_3" class="optiton">

<li><a href="#">仿qq下拉表5</a></li>

<li><a href="#">仿qq下拉表6</a></li>

<li><a href="#">仿qq下拉表7</a></li>

<li><a href="#">仿qq下拉表8</a></li>

</ul>

</li>

</ul>

</body>

</html>

更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄

更多信息請(qǐng)查看腳本欄目
上一篇:js字體大小
下一篇:javascript:void(0)
易賢網(wǎng)手機(jī)網(wǎng)站地址:仿qq下拉表
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢(xún)回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門(mén)公布的正式信息和咨詢(xún)?yōu)闇?zhǔn)!

2025國(guó)考·省考課程試聽(tīng)報(bào)名

  • 報(bào)班類(lèi)型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢(xún) | 簡(jiǎn)要咨詢(xún)須知 | 加入群交流 | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專(zhuān)用圖標(biāo)
聯(lián)系電話(huà):0871-65099533/13759567129 獲取招聘考試信息及咨詢(xún)關(guān)注公眾號(hào):hfpxwx
咨詢(xún)QQ:526150442(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專(zhuān)用圖標(biāo)