树形菜单
作者:cmscn 日期:2007-05-20
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<style type=text/css>
div
{
border:1px solid green;
margin-left:10px;
margin-bottom:2px;
margin-right:2px;
background:#e8e8e8;
font-size:9pt;
color:blue;
font-weight:normal;
}
.root
{
border:1px solid green;
margin-left:10px;
margin-bottom:2px;
margin-right:2px;
background:#e8e8e8;
font-size:14px;
font-weight:bold;
color:red;
}
</style>
</HEAD>
<BODY onload=win_onload()>
<table width=100% border=0>
<tr><td id=root>
</td></tr></table>
</BODY>
</HTML>
<SCRIPT LANGUAGE=javascript>
<!--
info=new Array("党支部委员登记表","CBB",1,"申请入党人员登记表","CBB",3,"党小组长登记表","CBB",4,"入党积极分子登记表","CBB",5,"发展对象登记表","CBB",6,"预备党员转正登记表","CAA",7,"党员组织关系转入登记表","CAA",8,"党员组织关系转出登记表","CAA",9,"测试大文档","CAA",10,"sssssss","CAA",22,"");
department=new Array("党委办公室","CAA","人事劳资处","CBB","");
oper=new Array("人事劳资处","CBB","");
function docname_onclick(docid){
event.cancelBubble=true
if(confirm("确定要关闭当前文档打开"+info[docid-2]+"吗?")==1){
nowdocid=info[docid]
parent.frames[2].ClosetheDoc()
var str_docpath="F:TempPartyDOC\\temp.doc"
parent.frames[3].location="party.dll?Openonedoc?x1=lxsvr&x2=sa&x3=lxwww&x4=partydb&x5=PartyDOC_table&x6=PartyDOC&x7="+str_docpath+"&x8=where docid="+info[docid]+"&x9=O";
sw=setInterval("jud()",1000)
}
}
function win_onload()
{
for(var i=0;i<department.length-1;i+=2)
{
eval("root"+i+"=document.createElement(\"div\")")
eval("root"+i+".innerText='+"+department[i]+"'")
eval("root"+i+".onclick=new Function(\"judge(this)\")")
eval("root"+i+".className='root'")
eval("root.appendChild(root"+i+")")
if(department[i+1]==oper[1])
{
for(var j=0;j<info.length;j+=3)
{
if(department[i+1]==info[j+1])
{
eval("node"+j+"=document.createElement(\"div\")")
eval("node"+j+".innerText='-"+info[j]+"'")
eval("node"+j+".onmouseover=function(){this.style.backgroundColor='#189265';this.style.cursor='hand'}")
eval("node"+j+".onmouseout=function(){this.style.backgroundColor='#e8e8e8'}")
eval("node"+j+".style.display=''")
eval("node"+j+".onclick=new Function(\"docname_onclick("+info[j+2]+")\")")
eval("root"+i+".appendChild(node"+j+")")
}
}
}
else
{
for(var j=0;j<info.length;j+=3)
{
if(department[i+1]==info[j+1])
{
eval("node"+j+"=document.createElement(\"div\")")
eval("node"+j+".innerText='-"+info[j]+"'")
eval("node"+j+".style.display='none'")
eval("node"+j+".onmouseover=function(){this.style.backgroundColor='#189265';this.style.cursor='hand'}")
eval("node"+j+".onmouseout=function(){this.style.backgroundColor='#e8e8e8'}")
eval("node"+j+".onclick=new Function(\"docname_onclick("+info[j+2]+")\")")
eval("root"+i+".appendChild(node"+j+")")
}
}
}
}
}
function judge(obj)
{
var a=obj.children
for(var i=0;i<obj.children.length;i++)
{
if(obj.children[i].style.display=="none")
{
obj.children[i].style.display=""
}
else
{
obj.children[i].style.display="none"
}
}
}
document.cancelBubble=true
</SCRIPT>
评论: 7 | 引用: 0 | 查看次数: 712
发表评论