html分级显示的下拉列表,左侧的隐藏菜单,点击后显示下拉分级菜单的内容

web

reference

var maxmnus = 5

function opTab(){

var mnu = document.getElementByIdx("menubar")

var arrdiv = document.getElementByIdx("arrow")

var arrtxt = document.getElementByIdx("arr")

if((mnu.style.display != "block") || (mnu.style.display ==

"")){

mnu.style.display = "block"

arrdiv.style.pixelLeft = mnu.style.width.substring(0 ,

mnu.style.width.length - 2)

arrtxt.innerText = "3";

} else {

mnu.style.display = "none"

arrtxt.innerText = "4";

arrdiv.style.pixelLeft = 0;

}

event.cancelBubble = true;

}

function toggleMenu(el){

for(var i = 0;i < maxmnus;i++)

document.getElementByIdx(document.getElementByIdx("c" +

i).menu).style.display = "none";

if(el.status == "closed"){

el.status = "open"

document.getElementByIdx(el.menu).style.display = "block";

} else {

el.status = "closed"

}

}

function toggleSub(e){

el = document.getElementByIdx(e)

if(el.status == "closed"){

el.style.display = "block";

el.status = "open"

} else {

el.style.display = "none";

el.status = "closed"

}

event.cancelBubble = true;

}

#menubar{

position:absolute;top:0px;left:0px;display:none;font-family:Verdana,Helvetica,Arial;font-weight:700;font-size:10px;cursor:hand;z-index:5;background-image:url();background-repeat:repeat-y;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',gradientType='1',startColorstr='#2644b2',

endColorstr='#e7e8f1');}

.indicator{

color:#b24426;font-family:Webdings;font-weight:bold;font-size:10px;}

.r1{

position:relative;top:10px;left:5px;width:213px;color:#e7e8f1;border-left:#e7e8f1

2px outset;border-top:#e7e8f1 2px outset;border-right:#e7e8f1 2px

outset;border-bottom:#e7e8f1 2px

outset;padding-left:5px;padding-top:1px;adding-right:5px;padding-bottom:1px;background-image:url();background-repeat:repeat-y;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',gradientType='1',startColorstr='#2644b2',

endColorstr='#e7e8f1');}

.submenu1{

position:relative;top:0px;left:0px;height:95%;width:100%;border-left:#e0f8e3

2px inset;border-top:#e0f8e3 2px inset;border-right:#e0f8e3 2px

inset;border-bottom:#e0f8e3 2px

inset;padding-left:3px;padding-top:3px;padding-right:3px;padding-bottom:3px;display:none;color:#2644b2;font-family:Verdana,Helvetica,Arial;font-weight:700;font-size:10px;background-color:#cff1d4;background-image:url();background-repeat:repeat-y;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',gradientType='1',startColorstr='#bec1e4',

endColorstr='#e7e8f1');}

.submenu2{

position:relative;top:0px;left:0px;width:90%;border-left:#e0f8e3

3px groove;border-top:#e0f8e3 3px groove;border-right:#e0f8e3 3px

groove;border-bottom:#e0f8e3 3px

groove;padding-left:3px;padding-top:3px;padding-right:3px;padding-bottom:3px;margin-top:4px;display:none;background-color:#cff1d4;color:#2644b2;font-family:Verdana,Helvetica,Arial;font-weight:700;font-size:10px;background-image:url();background-repeat:repeat-y;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',gradientType='1',startColorstr='#bec1e4',

endColorstr='#e7e8f1');}

.pulltab{

position:absolute;top:0px;left:0px;height:100%;width:20px;padding-left:2px;cursor:hand;color:#2644b2;font-family:Webdings;font-weight:bold;font-size:10px;z-index:5;background-image:url();background-repeat:repeat-y;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',gradientType='1',startColorstr='#e7e8f1',

endColorstr='#2644b2');}

.inner{

height:100%;width:100%;}

.mtab{

position:relative;top:0px;

.btninner{

height:100%;width:100%;}

.fr{

position:absolute;top:0px;left:30px;}

οnclick="opTab()">

class="inner">

id="arr"

valign="middle">4

class="fr">

左侧的变化菜单

This menu is specifically designed

for IE5.5+, there will be a version for N6+ and Mozilla 0.9.2

soon

  1. Click on the bar to the left to

    open or close the menu

  2. Clicking on any menu item would

    normally display a page here and/or show a submenu indicated by a

    down arrow at Jon Steele's

    suggestion

  3. The fourth item of the

    "Behavoirs" menu, "Viewlink Overview" has a

    sub-menu.

  4. No menu will remain open if

    another is clicked

  5. Clicking on the same menu item

    toggles it open or closed

    accordingly

  6. Selection of a link closes the

    menu automatically

  7. The IE 5.5 version, uses no

    images, the colouration is from a behavior that requires

    5.5

  8. The 5.0 version uses 2 small jpg

    but are of lesser quality.

  9. This menu is designed, primarily,

    for dynamic page. The adat for the page would either be placed here

    via XML or arrays or document/write method.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值