Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2316332
  • 博文数量: 252
  • 博客积分: 5472
  • 博客等级: 大校
  • 技术积分: 3107
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-17 18:39
文章分类

全部博文(252)

文章存档

2012年(96)

2011年(156)

分类: 系统运维

2011-12-13 10:32:58

  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  5. %>

  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8.   <head>
  9.     <base href="<%=basePath%>">
  10.     
  11.     <title>My JSP 'index.jsp' starting page</title>
  12.     <meta http-equiv="pragma" content="no-cache">
  13.     <meta http-equiv="cache-control" content="no-cache">
  14.     <meta http-equiv="expires" content="0">
  15.     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  16.     <meta http-equiv="description" content="This is my page">
  17.     
  18.   </head>
  19.   
  20.   <body>
  21.     This is my JSP page. <br>
  22.     
  23.     <SCRIPT src="pic_play.js" type="text/javascript"></SCRIPT>
  24. <DIV id=oTransContainer style="FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0, wipeStyle=0, motion='forward'); WIDTH: 930px; ">
  25.       <IMG id=oDIV1 style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: yes; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid" src="img/banner4.jpg" width=930 border=0>
  26.      <IMG id=oDIV2 style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: none; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid" src="img/banner2.jpg" width=930 border=0>
  27.      <IMG id=oDIV3 style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: none; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid" src="img/banner1.jpg" width=930 border=0>
  28.      <IMG id=oDIV4 style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: none; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid" src="img/banner3.jpg" width=930 border=0>
  29. </div>
  30.   </body>
  31. </html>

 

JS

 

  1. var NowFrame = 1;
  2.     var MaxFrame = 4;
  3.     var bStart = 0;
  4.     function fnToggle() {
  5.     var next = NowFrame + 1;
  6.     if(next == MaxFrame+1)
  7.     {
  8.     NowFrame = MaxFrame;
  9.     next = 1;
  10.     }
  11.     if(bStart == 0)
  12.     {
  13.     bStart = 1;
  14.             
  15.     setTimeout('fnToggle()', 1000);
  16.     return;
  17.     }
  18.     else
  19.     {
  20.     oTransContainer.filters[0].Apply();
  21.     document.images['oDIV'+next].style.display = "";
  22.     document.images['oDIV'+NowFrame].style.display = "none";
  23.     oTransContainer.filters[0].Play(duration=3);
  24.     if(NowFrame == MaxFrame)
  25.     NowFrame = 1;
  26.     else
  27.     NowFrame++;
  28.     } setTimeout('fnToggle()', 6000);
  29.     }
  30.     fnToggle();

 

 

阅读(2606) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~