<script language="JavaScript">
<!--
var layerTop=0; //菜单顶边距
var layerLeft=2; //菜单左边距
var layerWidth=140; //菜单总宽
var titleHeight=20; //标题栏高度
var contentHeight=200; //内容区高度
var stepNo=10; //移动步数,数值越大移动越慢
var A="YES"
var itemNo=0;runtimes=0;
document.write('<span id=itemsLayer style="position:absolute;overflow:hidden;border:1px solid #008800;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>'+
'<tr><td height='+contentHeight+' class="contentStyle">'+itemContent+'</td></tr></table></div>';
document.write(itemHTML);
itemNo++;
}
//添加菜单标题和内容,可任意多项,注意格式:
var ctrlNotice=""
if (A=="YES") ctrlNotice='<BR><a href="tongzhi/kan.asp"><img name="Image13" border="0" src="../image/menu2-2-a.gif" width="32" height="32"><br>管理通告</a> <BR>'
addItem('单位公告','<center> <a href="tongzhi/addtongzhi.asp"><img name="Image12" border="0" src="../image/menu2-1-a.gif" width="32" height="32"><br>发布通告</a> <BR>'+ctrlNotice+'<BR><a href="tongzhi/tongzhi.asp"><img name="Image14" border="0" src="../image/menu2-3-a.gif" width="32" height="32"><br>浏览通告</a></center>');
document.write('</span>')
document.all.itemsLayer.style.height=itemNo*titleHeight+contentHeight; toItemIndex=itemNo-1;onItemIndex=itemNo-1; function changeItem(clickItemIndex){
toItemIndex=clickItemIndex;
if(toItemIndex-onItemIndex>0) moveUp(); else moveDown();
runtimes++;
if(runtimes>=stepNo){
onItemIndex=toItemIndex;
runtimes=0;}
else
setTimeout("changeItem(toItemIndex)",10);
} function moveUp(){
for(i=onItemIndex+1;i<=toItemIndex;i++)
eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)-contentHeight/stepNo;');
} function moveDown(){
for(i=onItemIndex;i>toItemIndex;i--)
eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)+contentHeight/stepNo;');
}
changeItem(0);
//-->
</script>
<!--
var layerTop=0; //菜单顶边距
var layerLeft=2; //菜单左边距
var layerWidth=140; //菜单总宽
var titleHeight=20; //标题栏高度
var contentHeight=200; //内容区高度
var stepNo=10; //移动步数,数值越大移动越慢
var A="YES"
var itemNo=0;runtimes=0;
document.write('<span id=itemsLayer style="position:absolute;overflow:hidden;border:1px solid #008800;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>'+
'<tr><td height='+contentHeight+' class="contentStyle">'+itemContent+'</td></tr></table></div>';
document.write(itemHTML);
itemNo++;
}
//添加菜单标题和内容,可任意多项,注意格式:
var ctrlNotice=""
if (A=="YES") ctrlNotice='<BR><a href="tongzhi/kan.asp"><img name="Image13" border="0" src="../image/menu2-2-a.gif" width="32" height="32"><br>管理通告</a> <BR>'
addItem('单位公告','<center> <a href="tongzhi/addtongzhi.asp"><img name="Image12" border="0" src="../image/menu2-1-a.gif" width="32" height="32"><br>发布通告</a> <BR>'+ctrlNotice+'<BR><a href="tongzhi/tongzhi.asp"><img name="Image14" border="0" src="../image/menu2-3-a.gif" width="32" height="32"><br>浏览通告</a></center>');
document.write('</span>')
document.all.itemsLayer.style.height=itemNo*titleHeight+contentHeight; toItemIndex=itemNo-1;onItemIndex=itemNo-1; function changeItem(clickItemIndex){
toItemIndex=clickItemIndex;
if(toItemIndex-onItemIndex>0) moveUp(); else moveDown();
runtimes++;
if(runtimes>=stepNo){
onItemIndex=toItemIndex;
runtimes=0;}
else
setTimeout("changeItem(toItemIndex)",10);
} function moveUp(){
for(i=onItemIndex+1;i<=toItemIndex;i++)
eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)-contentHeight/stepNo;');
} function moveDown(){
for(i=onItemIndex;i>toItemIndex;i--)
eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)+contentHeight/stepNo;');
}
changeItem(0);
//-->
</script>
错误是 var ctrlNotice=""
这一行缺少对象
错误是 var ctrlNotice=""
这一行缺少对象
错误是 var ctrlNotice=""
这一行缺少对象
var guanli_tonggao_quan=session("guanli_tonggao")
if (guanli_tonggao_quan="yes") guanli_tonggao='<BR><BR><a href="tongzhi/kan.asp"><img name="Image13" border="0" src="../image/menu2-2-a.gif" width="32" height="32"><br>管理通告</a>';
addItem('单位公告','<center><a href="tongzhi/addtongzhi.asp"><img name="Image12" border="0" src="../image/menu2-1-a.gif" width="32" height="32"><br>发布通告</a> '+ guanli_tonggao +' <BR><BR><a href="tongzhi/tongzhi.asp"><img name="Image14" border="0" src="../image/menu2-3-a.gif" width="32" height="32"><br>浏览通告</a></center>');
var guanli_tonggao_quan=session("guanli_tonggao")
if (guanli_tonggao_quan="yes") guanli_tonggao='<BR><BR><a href="tongzhi/kan.asp"><img name="Image13" border="0" src="../image/menu2-2-a.gif" width="32" height="32"><br>管理通告</a>';
addItem('单位公告','<center><a href="tongzhi/addtongzhi.asp"><img name="Image12" border="0" src="../image/menu2-1-a.gif" width="32" height="32"><br>发布通告</a> '+ guanli_tonggao +' <BR><BR><a href="tongzhi/tongzhi.asp"><img name="Image14" border="0" src="../image/menu2-3-a.gif" width="32" height="32"><br>浏览通告</a></center>');
var guanli_tonggao_quan=session("guanli_tonggao")
if (guanli_tonggao_quan="yes") guanli_tonggao='<BR><BR><a href="tongzhi/kan.asp"><img name="Image13" border="0" src="../image/menu2-2-a.gif" width="32" height="32"><br>管理通告</a>';
addItem('单位公告','<center><a href="tongzhi/addtongzhi.asp"><img name="Image12" border="0" src="../image/menu2-1-a.gif" width="32" height="32"><br>发布通告</a> '+ guanli_tonggao +' <BR><BR><a href="tongzhi/tongzhi.asp"><img name="Image14" border="0" src="../image/menu2-3-a.gif" width="32" height="32"><br>浏览通告</a></center>');
var guanli_tonggao_quan=session("guanli_tonggao")
if (guanli_tonggao_quan=="yes") guanli_tonggao='<BR><BR><a href="tongzhi/kan.asp"><img name="Image13" border="0" src="../image/menu2-2-a.gif" width="32" height="32"><br>管理通告</a>';
addItem('单位公告','<center><a href="tongzhi/addtongzhi.asp"><img name="Image12" border="0" src="../image/menu2-1-a.gif" width="32" height="32"><br>发布通告</a> '+ guanli_tonggao +' <BR><BR><a href="tongzhi/tongzhi.asp"><img name="Image14" border="0" src="../image/menu2-3-a.gif" width="32" height="32"><br>浏览通告</a></center>');
var guanli_tonggao_quan=session("guanli_tonggao")
改成 var guanli_tonggao_quan="<%=session("guanli_tonggao")%>";
if (guanli_tonggao_quan="yes")
改成 guanli_tonggao_quan=="yes"