在Dreamweaver中用时间轴吧,挺方便的!!!

解决方案 »

  1.   

    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    </HEAD><BODY>
    <DIV id=img style="HEIGHT: 24px; LEFT: 0px; POSITION: absolute; TOP: 1582px; WIDTH: 99px">
    <img src="1.jpg" width="50" height="50">
    </DIV>
          
    <SCRIPT language=JavaScript> 
    var xPos = 20; 
    var yPos = document.body.clientHeight; 
    var step = 1; 
    var delay = 30;
    var height = 0; 
    var Hoffset = 0; 
    var Woffset = 0; 
    var yon = 0; 
    var xon = 0; 
    var pause = true; 
    var interval; 
    img.style.top = yPos; 
    function changePos() { 
    width = document.body.clientWidth; 
    height = document.body.clientHeight; 
    Hoffset = img.offsetHeight; 
    Woffset = img.offsetWidth; 
    img.style.left = xPos + document.body.scrollLeft; 
    img.style.top = yPos + document.body.scrollTop;  if (yon) { 
    yPos = yPos + step; 
    } else { 
    yPos = yPos - step; 

    if (yPos < 0) { 
    yon = 1; 
    yPos = 0; 

    if (yPos >= (height - Hoffset)) { 
    yon = 0; 
    yPos = (height - Hoffset); 
    }  if (xon) { 
    xPos = xPos + step; 

    else { 
    xPos = xPos - step; 

    if (xPos < 0) { 
    xon = 1; 
    xPos = 0; 

    if (xPos >= (width - Woffset)) { 
    xon = 0; 
    xPos = (width - Woffset); 

    }  function start() { 
    img.visibility = "visible"; 
    interval = setInterval('changePos()', delay); 

    start(); 
    </SCRIPT></BODY>
    </HTML>
      

  2.   

    <script>
    document.write('<DIV id=mov6 style="POSITION: absolute; width: 10px; height: 10px"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=80 HEIGHT=80><PARAM NAME=movie VALUE="http://www.163.net/ad/adv/netcn/netcn_100x100.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="http://www.163.net/ad/adv/netcn/netcn_100x100.swf" quality=high bgcolor=#FFFFFF  WIDTH=80 HEIGHT=80 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT><img src="http://bjad.163.net/image.ng/site=www163net&channel=163mainpage&SpaceDesc=mainpage&location=moving2" width="1" height="1" border="0"></DIV>');var xPos = 250;
    var yPos = document.body.clientHeight;
    var step = 1;
    var delay = 20; 
    var height = 0;
    var Hoffset = 0;
    var Woffset = 0;
    var yon = 0;
    var xon = 0;
    var pause = true;
    var interval;
    mov6.style.top = yPos;
    function changePos() {
    width = document.body.clientWidth;
    height = document.body.clientHeight;
    Hoffset = mov6.offsetHeight;
    Woffset = mov6.offsetWidth;
    mov6.style.left = xPos + document.body.scrollLeft;
    mov6.style.top = yPos + document.body.scrollTop;
    if (yon) {
    yPos = yPos + step;
    }
    else {
    yPos = yPos - step;
    }
    if (yPos < 0) {
    yon = 1;
    yPos = 0;
    }
    if (yPos >= (height - Hoffset)) {
    yon = 0;
    yPos = (height - Hoffset);
    }
    if (xon) {
    xPos = xPos + step;
    }
    else {
    xPos = xPos - step;
    }
    if (xPos < 0) {
    xon = 1;
    xPos = 0;
    }
    if (xPos >= (width - Woffset)) {
    xon = 0;
    xPos = (width - Woffset);
       }
    }
    function start() {
    mov6.visibility = "visible";
    interval = setInterval('changePos()', delay);
    }start();
    </script>