javascript特效實現翻頁顯示頁面内容

發布時間:2007年02月27日      浏覽次數:2494 次
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
body {      margin-left: 0px;      margin-top: 0px;}
.l12 { font-size: 12px; color: #000066; text-decoration: none line-height: 20px; font-family: "宋體(tǐ)"}
.myDIV { FILTER: revealTrans(transition=18,duration=2); WIDTH:650px; POSITION: absolute}
-->
</style>
<title>嵌入-變動</title>
</head>
<body onload=setTime() topmargin=0 marginheight=0 leftmargin=0 marginwidth=0 bgcolor="ffffff" >
<table width="668" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td valign="top"> <div style="height:271 ">
<DIV id=sc1 class=myDIV onmouseover=isScroll(1) style='visibility: visible; width: 668px' onmouseout=isScroll(0)>
<table width="300" height="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#DFFFDF">
<tr>
<td><div align="center">翻頁顯示頁面内容一(yī)</div></td>
</tr>
</table>
</div>
<DIV id=sc2 class=myDIV onmouseover=isScroll(1) style='VISIBILITY: hidden; width: 668px' onmouseout=isScroll(0)>
<table width="300" height="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFCCAA">
<tr>
<td><div align="center">翻頁顯示頁面内容二</div></td>
</tr>
</table>
</div>
</div></td>
</tr>
</table>
<SCRIPT>
var sc1=document.getElementById('sc1');
var sc2=document.getElementById('sc2');
//設置顯示哪個層的變量
var sL=1;
//設置動與不動的變量
var iS=0;
//設定顯示時間
function setTime()
{
      if(iS==0)
      {
            if(sL%2==1)
            {
                  cs1(sc1,1);
                  cs1(sc2,0);
                  setTimeout('setTime()',5000);
            }
            else{
                  cs1(sc1,0);
                  cs1(sc2,1);
                  setTimeout('setTime()',5000);
            }
            sL++;
      }
      else
            {
setTimeout('setTime()',5000);
             }
}
//顯示函數
function cs1(a,b)
{if(a==null)return;
a.filters.revealTrans.apply();
if(b==1) a.style.visibility='visible';
else a.style.visibility='hidden';
a.filters.revealTrans.play();}
//設定is變量
// v==1 不滾動 v==0 滾動
function isScroll(v){
iS=v;
}
</SCRIPT>
</body>
</html>
文章來源:桂林唯創網絡原創 --- 轉載請标明本頁具體(tǐ)網址與出處,否則視爲侵權
免責聲明:本站相關技術文章信息部分(fēn)來自網絡,目的主要是傳播更多信息,如果您認爲本站的某些信息侵犯了您的版權,請與我(wǒ)(wǒ)們聯系,我(wǒ)(wǒ)們會即時妥善的處理,謝謝合作!