仿Office 2003的工具条
2008-01-05 19:01:18 来源:WEB开发网<Html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>仿Office 2003的工具条</title>
<script>
/*----------
舜子制作
Menu javascript Made by PuterJam
E-mail:puterjam@etang.com
-------------*/
var listnum=0;
var menu_height;
var menu_width;
var menu_left;
var menu_top;
var topMar = 1;
var leftMar = -2;
var space = 1;
var isvisible;
function listbox(listname,buttonname,valuename)
{
this.listname=listname
this.buttonname=buttonname
this.valuename=valuename
}
function listaction(obj,action,showlist,scroll,tw)
{
num=obj.id.charAt(obj.id.length-1)
if (!scroll) {scroll=0}
if (!tw) {tw=105}
listbox=eval(lb[num].listname)
listbutton=eval(lb[num].buttonname)
listvalue=eval(lb[num].valuename)
switch (action)
{
case 0:
listbox.className="getlist";listbutton.className="listover"
break;
case 1:
if (listbox.gf=="0")
{listbox.className="lostlist";listbutton.className="menubar"}
break;
case 2:
for (i=0;i<lb.length;i++)
{
if (num!=i.toString()){
nlistbox=eval(lb[i].listname)
nlistbutton=eval(lb[i].buttonname)
nlistvalue=eval(lb[i].valuename)
nlistbox.className="lostlist";nlistbutton.className="menubar"
nlistbox.gf="0"
}
}
ShowMenu(listbox,showlist,tw,scroll);listbox.className="getlist";listbox.gf="1"
listnum=num;
break;
}
}
function HideMenu()
{
var mX;
var mY;
var vDiv;
var mDiv;
if (isvisible == true)
{
vDiv = document.all("listDiv");
mX = window.event.clientX + document.body.scrollLeft;
mY = window.event.clientY + document.body.scrollTop;
if ((mX < parseInt(vDiv.style.left)) (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth)
(mY < parseInt(vDiv.style.top)-menu_height) (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)) {
vDiv.style.visibility = "hidden";
isvisible = false;
}
}
if (isvisible==false)
{
for (i=0;i<lb.length;i++)
{
listbox=eval(lb[i].listname)
listbutton=eval(lb[i].buttonname)
listvalue=eval(lb[i].valuename)
listbox.className="lostlist";listbutton.className="menubar"
listbox.gf="0"
}
}
}
- ››office默认输入法设置
- ››Office2010操作小技巧:使用Excel聊天
- ››Office2010操作技巧:Excel自动读取单元格内容
- ››Office2007新文件格式的优点
- ››Office 2010 新特性:Outlook 2010
- ››Office 2010 新特性:PowerPoint 2010
- ››Office 2010 新特性: Excle 2010
- ››Office中Word十技巧 受益终身
- ››Office 2010宝典 word之利用文档导航窗格控制文档...
- ››Office 2010宝典 word之(2)利用文档导航窗格搜索文...
- ››Office 2010宝典 word之(3)可以朗读的屏幕取词翻译...
- ››Office 2010宝典 word之(4)多语言翻译
更多精彩
赞助商链接