ASP与数据库,有用的代码(转贴,摘贴)(14)
subMenu[i].style.display = 'none';
sub_display = hide;
}
function subMenu_Show(obj, s) {
subMenu_Hide(false);
subMenu(s).style.posLeft = obj.offsetLeft + 6;
subMenu(s).style.display = '';
sub_display = true;
}
window.onfocus = subMenu_Hide;
</script>
=-=======================-----------------========================================
模仿OUTLOOK的菜单:
<head>
<style type="text/css">
.titleStyle{
background-color:#3366cc;color:#ffffff;border-top:1px solid #FFFFFF;font-size:9pt;cursor:hand;
}
.contentStyle{
background-color:#efefef;color:blue;font-size:9pt;
}
a{
color:blue;
}
body{
font-size:9pt;
}
</style>
</head>
<body>
<script language="JavaScript">
<!--
var layerTop=20; //菜单顶边距
var layerLeft=30; //菜单左边距
var layerWidth=140; //菜单总宽
var titleHeight=20; //标题栏高度
var contentHeight=200; //内容区高度
var stepNo=10; //移动步数,数值越大移动越慢
var itemNo=0;runtimes=0;
document.write('<span id=itemsLayer style="position:absolute;overflow:hidden;border:1px solid #efefef;left:'+layerLeft+';top:'+layerTop+';width:'+layerWidth+';">');
function addItem(itemTitle,itemContent){
itemHTML='<div id=item'+itemNo+' itemIndex='+itemNo+' style="position:relative;left:0;top:'+(-contentHeight*itemNo)+';width:'+layerWidth+';"><table width=100% cellspacing="0" cellpadding="0">'+
'<tr><td height='+titleHeight+' onclick=changeItem('+itemNo+') class="titleStyle" align=center>'+itemTitle+'</td></tr>'+
内容版权声明:除非注明,否则皆为本站原创文章。