📄 index.js
字号:
var nowMT=-36;
var tagMT=0;
var adobj;
var opendiv;
var closdiv;
var addfunc;
var handobj;
var reducefunc;
var speed=2;
function showtopad(){
adobj=document.getElementById("bigad");
opendiv=document.getElementById("opendiv");
closdiv=document.getElementById("closdiv");
if (nowMT<=0){
adobj.style.display="block";
addfunc=setInterval("addheight()",1);
}
}
function closetopad(){
//alert(nowMT);
if (nowMT<=speed){
callreduceheight();
if (typeof(handobj)=="number"){
clearTimeout(handobj);
}
}
}
function addheight(){
nowMT+=speed;
if (nowMT>tagMT){
clearInterval(addfunc);
//handobj=setTimeout("callreduceheight()",5000);
return;
}
adobj.style.marginTop=nowMT+"px";
//adobj.style.height=nowheight+"px";
//nowheight+=speed;
//if (nowheight>maxheight){
//clearInterval(addfunc);
//handobj=setTimeout("callreduceheight()",5000);
//return;
//}
//adobj.style.height=nowheight+"px";
}
function callreduceheight(){
reducefunc=setInterval("reduceheight()",1);
}
function reduceheight(){
adobj.style.marginTop=nowMT+"px";
nowMT-=speed;
if (nowMT<=-36){
clearInterval(reducefunc);
adobj.style.display="none";
return;
}
//adobj.style.height=nowheight+"px";
//nowheight-=speed;
//if (nowheight<=0){
//clearInterval(reducefunc);
//adobj.style.display="none";
//opendiv.style.display="block";
//return;
//}
}
//</script>
//<script type="text/javascript">
/* promotion */
/*
function changeImg(){
var myArrayA=new Array(2)
myArrayA[0]="$imageServer.getURI('pics/sys/index/character_a.gif')";myArrayA[1]="$imageServer.getURI('pics/sys/index/character_b.gif')";
var myArrayB=new Array(2)
myArrayB[0]="$imageServer.getURI('pics/sys/index/slogan_a.gif')";myArrayB[1]="$imageServer.getURI('pics/sys/index/slogan_b.gif')";
var character=document.getElementById("character");
var slogan=document.getElementById("slogan");
index=Math.floor(Math.random() * myArrayB.length);
slogan.src=myArrayB[index];
character.src=myArrayA[index];
}
if(window.attachEvent)
{
window.attachEvent("onload",changeImg);
}
else
{
window.addEventListener("load",changeImg,false);
}
*/
/* news */
var sl_i=6;
$("#news ul li").hide();
$("#news ul li").eq(0).show();
var sI=setInterval("sl()",5000);
function sl(sl_q){
if(sI)
{
clearInterval(sI);
}
sI=setInterval("sl()",5000);
if (sl_q==null)
{
/*
alert('undefined');
*/
sl_j=sl_i%5;
/*
sl_i=sl_q+6;
sl_j=sl_i%5;
*/
}
else{
/*
alert(sl_q);
*/
sl_i=sl_q+6;
sl_j=sl_i%5;
/*
sl_j=sl_i%5;
*/
}
$("#news ul li").hide();
$("#news ul li").eq(sl_j).show("slow");
$("#news ol li a").removeClass("active");
$("#news ol li a").eq(sl_j).addClass("active");
sl_i++;
}
/*sI=setInterval("sl()",5000);*/
/*
$("#news ol li a").click(function(){
window.clearInterval(sI);
sl(this.rel);
});
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -