嵌入-变动 特效 很爽 两页内容交替显示

发布时间:2007年06月12日      浏览次数:1735 次
<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: "宋体"}
.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="258" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td valign="top"><div style="height:258 ">
<DIV id=sc1 class=myDIV onmouseover=isScroll(1) style='visibility: visible; width: 254px' onmouseout=isScroll(0)>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#CCCCCC" height="300"><div align="center">在这里放你的第一页的内容</div></td>
</tr>
</table>
</div>
<DIV id=sc2 class=myDIV onmouseover=isScroll(1) style='VISIBILITY: hidden; width: 258px' onmouseout=isScroll(0)>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="green" height="300"><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>
文章来源:桂林唯创网络
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!