订阅本栏目 RSS您所在的位置: 深山工作室 > 页面特效 > 正文

网上页面java图片循环滚动特效

网络 2007/11/17 23:30:19 深山行者 字体: 浏览 16517

多张图片变幻

<script language="JavaScript">
var elady_step=3; //1:small, 3:middle, 5:big
var elady_speed=50; //20:fast, 50:middle, 80:slow
var e_tp=new Array();
var e_tplink=new Array();
var adNum_elady1=0; 
var elady_stop_sh=0;
var elady_star_sh=1;

function elady1_moveImg(){
if ((!document.all&&!document.getElementById)||(elady_stop_sh==0)) return;
if (elady_star_sh==1){
 document.all.elady1_divimg.style.pixelTop=parseInt(document.all.elady1_divimg.style.pixelTop)+elady_step;}
else if (elady_star_sh==2){
 document.all.elady1_divimg.style.pixelLeft=parseInt(document.all.elady1_divimg.style.pixelLeft)+elady_step;}
else if (elady_star_sh==3){
 document.all.elady1_divimg.style.pixelTop=parseInt(document.all.elady1_divimg.style.pixelTop)-elady_step;}
else{
 document.all.elady1_divimg.style.pixelLeft=parseInt(document.all.elady1_divimg.style.pixelLeft)-elady_step;}
if (elady_star_sh<4) elady_star_sh++;
else elady_star_sh=1;
setTimeout("elady1_moveImg()",elady_speed);}

e_tplink[0]="http://www.baidu.com";
e_tp[0]="images/04.jpg";
e_tplink[1]="http://www.baidu.com";
e_tp[1]="images/03.jpg";
e_tplink[2]="http://www.baidu.com";
e_tp[2]="images/02.jpg";
e_tplink[3]="http://www.baidu.com";
e_tp[3]="images/01.jpg";

var currentimage=new Array();  
for (i=0;i<=3;i++){currentimage[i]=new Image();
      currentimage[i].src=e_tp[i];
         }
         function elady1_set(){   if (document.all)
         {      e_tprotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
               e_tprotator.filters.revealTrans.apply();   }
               }
               function elady1_playCo()
               {   if (document.all)      e_tprotator.filters.revealTrans.play()
               }function elady1_nextAd(){   if(adNum_elady1<e_tp.length-1)adNum_elady1++ ;
                     else adNum_elady1=0;
                        elady1_set();
                           document.images.e_tprotator.src=e_tp[adNum_elady1];
                              elady1_playCo();
                                 theTimer=setTimeout("elady1_nextAd()", 4000);}
                                 function elady1_linkurl(){   jumpUrl=e_tplink[adNum_elady1];
                                    jumpTarget='_blank';
                                       if (jumpUrl != ''){      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
                                             else location.href=jumpUrl;
                                                }}
function elady1_listMsg()
{   status=e_tplink[adNum_elady1];
document.returnValue = true;}
document.write("<div id='elady1_divimg' style='position:relative'>");
document.write('<a onMouseOver="elady1_listMsg();return document.returnValue" href="javascript:elady1_linkurl()" target="_self">');
document.write('<img style="FILTER: revealTrans(duration=2,transition=20)" src="javascript:elady1_nextAd()" border=0 width=552 height=65 name=e_tprotator onMouseover="elady_stop_sh=1" onMouseout="elady_stop_sh=0" ></a>');
document.write("</div>");
</script>

背景图片随机提取

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<SCRIPT language=JavaScript src="index.js.file/index.js"></SCRIPT>
<% Const IMGS_DIR = "images/"
Dim objFSO, objFolderObject, objFileCollection, objFile
Dim intFileNumberToUse, intFileLooper
Dim objImageFileToUse
Dim strImageSrcText
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolderObject = objFSO.GetFolder(Server.MapPath(IMGS_DIR))
Set objFSO = Nothing
Set objFileCollection = objFolderObject.Files
Set objFolderObject = Nothing
Randomize()
intFileNumberToUse = Int(objFileCollection.Count * Rnd) + 1
intFileLooper = 1
For Each objFile in objFileCollection
 If intFileLooper = intFileNumberToUse Then
  Set objImageFileToUse = objFile
  Exit For
 End If
 intFileLooper = intFileLooper + 1
Next
Set objFileCollection = Nothing
strImageSrcText = IMGS_DIR & objImageFileToUse.Name
Set objImageFileToUse = Nothing
%>
</head>

<body>
<table width="372" height="157" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr bgcolor="#FFFFFF">
    <td><img src="<%= strImageSrcText %>" width="345" height="82" border=0></td>
  </tr>
</table>

 

左右推动图片

<TABLE cellSpacing=0 cellPadding=0 width="58%"
border=0>
  <TBODY>
    <TR>
      <TD width=50 height=146>&nbsp;</TD>
      <TD width=346>
        <SCRIPT language=JavaScript1.2>

//Presentational Slideshow Script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for legal use

var slideshow_width='124px' //SET SLIDESHOW WIDTH (set to largest image's width if multiple dimensions exist)
var slideshow_height='145px' //SET SLIDESHOW HEIGHT (set to largest image's height if multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var slidebgcolor="white"

var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="images/01.jpg"
dropimages[1]="images/02.jpg"
dropimages[2]="images/03.jpg"

var droplinks=new Array()
//SET IMAGE URLs. Use "" if you wish particular image to NOT be linked:
droplinks[0]=""
droplinks[1]=""
droplinks[2]=""


////NO need to edit beyond here/////////////

var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src="/dropimages[p]"
}

var ie4=document.all
var dom=document.getElementById

if (ie4||dom)
document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';background-color:'+slidebgcolor+';left:-'+slideshow_width+'"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';background-color:'+slidebgcolor+';left:-'+slideshow_width+'"></div></div>')
else
document.write('<a href="javascript:rotatelink()"><img name="defaultslide" src="'+dropimages[0]+'" border=0></a>')

var curpos=parseInt(slideshow_width)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=linkindex=0
var nextimageindex=1


function movepic(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.left=curpos+"px"
}
else{

clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
var slideimage='<img src="'+dropimages[curimageindex]+'" border=0>'
tempobj.innerHTML=(droplinks[curimageindex]!="")? '<a href="'+droplinks[curimageindex]+'">'+slideimage+'</a>' : slideimage
nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}

function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src="/dropimages[curimageindex]"
linkindex=curimageindex
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}

function rotatelink(){
if (droplinks[linkindex]!="")
window.location=droplinks[linkindex]
}

function resetit(what){
curpos=parseInt(slideshow_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}

function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img src="'+dropimages[curimageindex]+'" border=0></a>'
rotateimage()
}

if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)

</SCRIPT>
&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>

 

表格变色

<script language="JavaScript" type="text/JavaScript">
<!--
function pviiW3Cbg(obj, pviiColor) { //v1.1 by Project VII
 obj.style.backgroundColor=pviiColor
}
//-->
</script>

<body onLoad="pviiW3Cbg(this, '#00CC99')">
<table width="335" height="66" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td onMouseOver="pviiW3Cbg(this, '#0000FF')" onMouseOut="pviiW3Cbg(this, '#FFFFFF')">wq </td>
  </tr>
</table>
</body>

 

图片左右动

   <MARQUEE onmouseover=this.stop() onmouseout=this.start()
            scrollAmount=5 behavior=alternate width=514 height=70>
        <TABLE cellSpacing=2 cellPadding=0 width=386 border=0>
          <TBODY>
            <TR>
              <TD vAlign=top width=190 height=172><A
                  href="http://www.baidu.com/" target=_blank><IMG height=170  src="images/0.jpg" width=190 border=0></A></TD>
              <TD vAlign=top width=190 height=172><A
                  href="http://www.baidu.com/" target=_blank><IMG height=170  src="images/4.jpg" width=190 border=0></A></TD>
            </TR>
          </TBODY>
        </TABLE>
      </MARQUEE>

相关阅读
佳达国际货运代理有限公司
IE6不支持png24的解决办法(png24做为css的背景)
asp正则替换内容里的特定内容
经典实用的触发型导航菜单
uni-app基础知识事件绑定@click与@tap点击事件区别
利用javascript静态改变表单指向与提交方式
吉林省观光国际旅行社
如何加快网站访问速度
共有0条关于《网上页面java图片循环滚动特效》的评论
发表评论
正在加载评论......
返回顶部发表评论
呢 称:
表 情:
内 容:
评论内容:不能超过 1000 字,需审核,请自觉遵守互联网相关政策法规。
验证码: 验证码 
网友评论声明,请自觉遵守互联网相关政策法规。

您发布的评论即表示同意遵守以下条款:
一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家、社会、集体和公民的合法权益;
二、不得发布国家法律、法规明令禁止的内容;互相尊重,对自己在本站的言论和行为负责;
三、本站对您所发布内容拥有处置权。

更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
DIV+CSS
HTML
更多>>同类信息
canvas绘制的文字如何换行
兼容pc、移动端用js实现复制内容到剪切板(支持苹果safari浏览器)
js兼容多个浏览器右下角漂浮广告
兼容ie6+和火狐的禁止右键
做在线客服时,聊天窗口的div滚动条始终在底部
javascript 表单(文本框)触发鼠标事件大全
更多>>最新添加文章
呼伦贝尔市北天草原旅行社有限公司
四川悠旅地旅游有限公司
连云港五洲旅行社有限公司
邓州市途鸿旅行社
连云港华夏国际旅行社有限公司
重庆长航江山国际旅行社
松原市海航商务旅行社
广西亚太国际旅行社有限公司
更多>>随机抽取信息
微信公众号生成带参数的二维码asp源码下载
uni-app基础知识事件绑定@click与@tap点击事件区别
连云港华夏国际旅行社
启动旅行社管理系统3.0的开发服务
CSS中的单位一览 包括宽度尺寸单位 颜色单位 角度单位
深山留言板警察出动效果