📄 outlook-like.js
字号:
var outlookbar=new outlook(); //建立一个outlookbar对象
var outlooksmoothstat = 0
function outlook()
{
//this.opentitle=-1
this.timedelay=50; //设定移动过程在多少毫秒内完成
this.inc=10; //设定每次移动的距离
}
function startbar(x)
{
src="outlookdiv"+x
document.all(src).style.display=""
document.all(src).style.height="100%"
outlookbar.opentitle=x
}
function switchoutlookBar(number) //click时的程序
{
var i = outlookbar.opentitle;
outlookbar.opentitle=number; //将当前打开的菜单值设为number
var id1,id2,id1b,id2b
if (number!=i)
{
id2="outlookdiv"+i;
id2b="outlookdivin"+i;
id1="outlookdiv"+number
id1b="outlookdivin"+number
smoothout(id1,id2,id1b,id2b,0);
}
//checkoutover(1)
}
function smoothout(id1,id2,id1b,id2b,stat)
{
if(stat==0){
document.all(id1b).style.overflow="hidden";
document.all(id2b).style.overflow="hidden";
document.all(id1).style.height="0%";
document.all(id1).style.display="";
setTimeout("smoothout('"+id1+"','"+id2+"','"+id1b+"','"+id2b+"',"+outlookbar.inc+")",outlookbar.timedalay);
}
else
{
stat+=outlookbar.inc;
if (stat>100)stat=100;
document.all(id1).style.height=stat+"%";
document.all(id2).style.height=(100-stat)+"%";
if (stat<100)
setTimeout("smoothout('"+id1+"','"+id2+"','"+id1b+"','"+id2b+"',"+stat+")",outlookbar.timedalay);
else
{
document.all(id2).style.display="none";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -