代替marquee的滚动字幕效果代码

方法一:
<! DOCTYPE html PUBLIC  " -//W3C//DTD XHTML 1.0 Transitional//EN "   " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
< html xmlns = " http://www.w3.org/1999/xhtml " >
< head >
< meta http - equiv = " Content-Type "  content = " text/html; charset=gb2312 "   />
< title > 热点新闻 </ title >
< style type = " text/css " >
<!--
body {
    margin: 0px;
    font
- size: 12px;
    color: #938C43;
    line
- height:  150 % ;
    text
- align:center;
}
a:link{color: #9D943A;font
- size:12px;}
a:hover{color: #FF3300;font
- size:12px;}
a:visited{color: #9D943A;font
- size:12px;}
a.red:link{color: #ff0000;font
- size:12px;}
a.red:hover{color: #ff0000;font
- size:12px;}
a.red:visited{color: #ff0000;font
- size:12px;}
#marqueeBox{background:#f7f7f7;border:1px solid silver;padding:1px;text
- align:center;margin: 0  auto;}
-->
</ style >
</ head >

< body >
< h4 > 滚动新闻 </ h4 >
< script language = " JavaScript "  type = " text/javascript " >
var  marqueeContent = new  Array();
marqueeContent[
0 ] = " <a href=http://xyq.163.com/news/2006/11/2-2-20061102170913.html target=_blank>用“梦幻密保”快速取回帐号密码</a> " ;
marqueeContent[
1 ] = " <a href=http://ekey.163.com/ target=_blank>网易将军令官方网站</a> " ;
marqueeContent[
2 ] = " <a href=http://xyq.163.com/download/wallpaper.htm target=_blank>最新壁纸下载</a> " ;
marqueeContent[
3 ] = " <a href=http://xyq.163.com/download/around.htm target=_blank>最新屏保下载</a> " ;
var  marqueeInterval = new  Array();
var  marqueeId = 0 ;
var  marqueeDelay = 2000 ;
var  marqueeHeight = 20 ;
function  initMarquee() {
    
var  str = marqueeContent[ 0 ];
    document.write('
< div id = " marqueeBox "  style = " overflow:hidden;width:250px;height:'+marqueeHeight+'px "  onmouseover = " clearInterval(marqueeInterval[0]) "  onmouseout = " marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay) " >< div > ' + str + ' </ div ></ div > ');
    marqueeId
++ ;
    marqueeInterval[
0 ] = setInterval( " startMarquee() " ,marqueeDelay);
}
function  startMarquee() {
    
var  str = marqueeContent[marqueeId];
    marqueeId
++ ;
    
if (marqueeId >= marqueeContent.length) marqueeId = 0 ;
    
if (document.getElementById( " marqueeBox " ).childNodes.length == 1 ) {
    
var  nextLine = document.createElement('DIV');
    nextLine.innerHTML
= str;
    document.getElementById(
" marqueeBox " ).appendChild(nextLine);
    }
    
else  {
        document.getElementById(
" marqueeBox " ).childNodes[ 0 ].innerHTML = str;
        document.getElementById(
" marqueeBox " ).appendChild(document.getElementById( " marqueeBox " ).childNodes[ 0 ]);
        document.getElementById(
" marqueeBox " ).scrollTop = 0 ;
    }
    clearInterval(marqueeInterval[
1 ]);
    marqueeInterval[
1 ] = setInterval( " scrollMarquee() " , 20 );
}
function  scrollMarquee() {
    document.getElementById(
" marqueeBox " ).scrollTop ++ ;
    
if (document.getElementById( " marqueeBox " ).scrollTop % marqueeHeight == (marqueeHeight - 1 )){
    clearInterval(marqueeInterval[
1 ]);
    }
}
initMarquee();
</ script >

</ body >
</ html >

方法二:
< html >
< head >
< title >  SCROLL  </ title >
< style type = " text/css " >
#infozone{font
- size:12px;color:#aa6;overflow:hidden;width:100px;height:20px;}
#infozone div{height:20px;line
- height:20px;white - space:nowrap;overflow:hidden;}
</ style >
< script type = " text/javascript " >
var  tc;
window.onload
= function (){
    
var  o = document.getElementById('infozone');hscroll(o);
    window.setInterval(
function (){window.clearTimeout(tc);o.firstChild.style.marginLeft = '0px';scrollup(o, 20 , 0 );}, 10000 );
}
function  scrollup(o,d,c){
    
if (d == c){
        
var  t = o.firstChild.cloneNode( true );
        o.removeChild(o.firstChild);o.appendChild(t);
        t.style.marginTop
= o.firstChild.style.marginTop = '0px';
        hscroll(o);
    }
    
else {
        ch
= false ; var  s = 3 ,c = c + s,l = (c >= d ? c - d: 0 );
        o.firstChild.style.marginTop
=- c + l + 'px';
        window.setTimeout(
function (){scrollup(o,d,c - l)}, 50 );
    }
}

function  hscroll(o){
    
var  w1 = o.firstChild.offsetWidth,w2 = o.offsetWidth;
    
if (w1 <= w2) return ;
    tc
= window.setTimeout( function (){hs(o,w1 - w2, 0 ,w1 - w2)}, 3500 );
}

function  hs(o,d,c,p){
    c
++ ; var  t = (c > 0 ?- c:c);o.firstChild.style.marginLeft = t + 'px';
    
if (c == d){ if (d == 0 ){tc = window.setTimeout( function (){hs(o,p, 0 ,p)}, 2500 );} else  tc = window.setTimeout( function (){hs(o, 0 , - p,p)}, 3500 );}
    
else  tc = window.setTimeout( function (){hs(o,d,c,p)}, 5 );
}
</ script >
</ head >

< body >
< div id = " infozone " >< div > 温岚  -  屋顶(周杰伦 对唱版) </ div >< div > 范玮琪  -  那些花儿 </ div >< div > 张韶涵  -  娃娃 </ div >< div > 孙楠 & 韩红  -  美丽的神话 </ div ></ div >
</ body >
</ html >

方法三:
<! DOCTYPE HTML PUBLIC  " -//W3C//DTD HTML 4.0 Transitional//EN " >
< HTML >
 
< HEAD >
  
< TITLE >  New Document  </ TITLE >
  
< META NAME = " Generator "  CONTENT = " EditPlus " >
  
< META NAME = " Author "  CONTENT = "" >
  
< META NAME = " Keywords "  CONTENT = "" >
  
< META NAME = " Description "  CONTENT = "" >
  
< style type = " text/css " >
    #newslist{
        background:#f7f7f7;border:1px solid silver;padding:1px;height:20px;line
- height:20px;width:300px;
    }
    #contain{
        font
- size:12px;overflow:hidden;list - style:none;width:300px;height:20px;margin:0px;padding: 0 ;
    }
    #contain li{
        height:20px;line
- height:20px;white - space:nowrap;overflow:hidden;
    }
</ style >
 
</ HEAD >

 
< BODY >
    
< div id = " newslist " >
        
< ul id = " contain " >
            
< li >< a href = " http:/www.iwcn.net " > 温岚  -  屋顶(左右摆动) </ a ></ li >
            
< li >< a href = " http:/www.iwcn.net " > 范玮琪  -  那些花儿 </ a ></ li >
            
< li >< a href = " http:/www.iwcn.net " > 张韶涵  -  娃娃 </ a ></ li >
            
< li >< a href = " http:/www.iwcn.net " > 孙楠 & 韩红  -  美丽的神话 </ a ></ li >
            
< li >< a href = " http:/www.iwcn.net " > 张信哲  -  白月光 </ a ></ li >
        
</ ul >
    
</ div >
< SCRIPT LANGUAGE = " JavaScript " >
function  xx(){
var  container = document.getElementById( " contain " );
container.appendChild(container.firstChild);
}
setInterval(
" xx() " , 3000 );
</ SCRIPT >
 
</ BODY >
</ HTML >

方法四:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
< HTML >
< HEAD >
< TITLE >  New Document  </ TITLE >
< META  NAME ="Generator"  CONTENT ="EditPlus" >
< META  NAME ="Author"  CONTENT ="" >
< META  NAME ="Keywords"  CONTENT ="" >
< META  NAME ="Description"  CONTENT ="" >
< style >
#test
{
    font-size
: 14px ; width : 100% ; font-family : 楷体_GB2312 ; color : lime ;
    filter
: progid:DXImageTransform.Microsoft.Glow(color=red, strength=4) ;
    
}
#oDiv
{ position : absolute ; width : 340px ; height : 40px ; background-color : black ; left : 320 ; top : 222 ; FILTER :  progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=white,endColorStr=pink) ; }
</ style >
< SCRIPT  LANGUAGE ="JavaScript" >
<!--
var  MoveMent = " 3 " ,Obj;
var  KeyMove  =  {K37: " left " ,K38: " top " ,K39: " left " ,K40: " top " };
var  Objscroll  =  {S37: " offsetLeft- " ,S38: " offsetTop- " ,S39: " offsetLeft+ " ,S40: " offsetTop+ " }
function  move(){
if  (event.keyCode  > 36   &&  event.keyCode  <   41 )
eval(
" oDiv.style. " + eval( " KeyMove.K " + event.keyCode) + " = " + " oDiv. " + eval( " Objscroll.S " + event.keyCode) + MoveMent);
}
// -->
</ SCRIPT >
</ HEAD >
< BODY  onkeydown ="move()" >
< div  id ="oDiv" >< br >< marquee  behavior ="alternate" >< Font  Size =3  Face ="楷体_GB2312" >< Font  Color ="#FF00FF" > </ Font >< Font  Color ="#9500FF" > </ Font >< Font  Color ="#2B00FF" > </ Font >< Font  Color ="#0030FF" > </ Font >< Font  Color ="#0080FF" > </ Font >< Font  Color ="#00C0EA" > </ Font >< Font  Color ="#00C080" > </ Font >< Font  Color ="#00C016" > </ Font >< Font  Color ="#55C000" > </ Font >< Font  Color ="#BFC000" > </ Font >< Font  Color ="#FFA000" > </ Font >< Font  Color ="#FF5000" > </ Font >< Font  Color ="#FF0000" > </ Font >< Font  Color ="#FF5000" > </ Font >< Font  Color ="#FFA000" > </ Font >< Font  Color ="#C0C000" > </ Font >< Font  Color ="#55C000" > </ Font >< Font  Color ="#00C015" > </ Font >< Font  Color ="#00C07F" > </ Font >< Font  Color ="#00C0E9" > </ Font >< Font  Color ="#0080FF" > </ Font >< Font  Color ="#0030FF" > </ Font >< Font  Color ="#2A00FF" > </ Font >< Font  Color ="#9400FF" > </ Font >< Font  Color ="#FF00FF" > </ Font ></ Font >
</ marquee ></ div >
< span  id ="sp" ></ span >
< br >< br >< br >< br >
< center >
< table  width ="179"  height ="178"  border ="0"  cellpadding ="0"  cellspacing ="0" >
  
< tr >
    
< td  width ="179" >< marquee  direction ="up"  width ="279"  height ="150"  scrollamount ="1"  scrolldelay ="1"  onMouseOver ="stop()"  onMouseOut ="start()" >
< p >< Font  Size =3  Face ="楷体_GB2312" >< Font  Color ="#FF00FF" > </ Font >< Font  Color ="#FA00FF" > </ Font >< Font  Color ="#F500FF" > </ Font >< Font  Color ="#EF00FF" > </ Font >< Font  Color ="#EA00FF" > </ Font >< Font  Color ="#E500FF" > </ Font >< Font  Color ="#DF00FF" > </ Font >< Font  Color ="#DA00FF" > </ Font >< Font  Color ="#D400FF" > </ Font >< Font  Color ="#CF00FF" > </ Font >< Font  Color ="#CA00FF" > </ Font >< Font  Color ="#C400FF" > </ Font >< Font  Color ="#BF00FF" > </ Font >< Font  Color ="#BA00FF" > </ Font >< Font  Color ="#B400FF" > </ Font >< Font  Color ="#AF00FF" > </ Font >< Font  Color ="#A900FF" > </ Font >< Font  Color ="#A400FF" > </ Font >< Font  Color ="#9F00FF" > </ Font >< Font  Color ="#9900FF" > </ Font >< Font  Color ="#9400FF" > </ Font >< Font  Color ="#8F00FF" > </ Font >< Font  Color ="#8900FF" > </ Font >< Font  Color ="#8400FF" > </ Font >< Font  Color ="#7E00FF" > </ Font >< Font  Color ="#7900FF" > </ Font >< Font  Color ="#7400FF" > </ Font >< Font  Color ="#6E00FF" > </ Font >< Font  Color ="#6900FF" > </ Font >< Font  Color ="#6300FF" > </ Font >< Font  Color ="#5E00FF" > </ Font >< Font  Color ="#5900FF" > </ Font >< Font  Color ="#5300FF" > </ Font >< Font  Color ="#4E00FF" > 饿 </ Font >< Font  Color ="#4900FF" > </ Font >< Font  Color ="#4300FF" > </ Font >< Font  Color ="#3E00FF" > </ Font >< Font  Color ="#3800FF" > </ Font >< Font  Color ="#3300FF" > </ Font >< Font  Color ="#2E00FF" > </ Font >< Font  Color ="#2800FF" > </ Font >< Font  Color ="#2300FF" > </ Font >< Font  Color ="#1E00FF" > </ Font >< Font  Color ="#1800FF" > </ Font >< Font  Color ="#1300FF" > </ Font >< Font  Color ="#0D00FF" > </ Font >< Font  Color ="#0800FF" > </ Font >< Font  Color ="#0300FF" > </ Font >< Font  Color ="#0002FF" > </ Font >< Font  Color ="#0006FF" > </ Font >< Font  Color ="#000AFF" > </ Font >< Font  Color ="#000EFF" > </ Font >< Font  Color ="#0012FF" > </ Font >< Font  Color ="#0016FF" > </ Font >< Font  Color ="#001AFF" > , </ Font >< Font  Color ="#001EFF" > </ Font >< Font  Color ="#0022FF" > </ Font >< Font  Color ="#0026FF" > </ Font >< Font  Color ="#002AFF" > </ Font >< Font  Color ="#002EFF" > ? </ Font >< Font  Color ="#0033FF" > </ Font >< Font  Color ="#0037FF" > 使 </ Font >< Font  Color ="#003BFF" > </ Font >< Font  Color ="#003FFF" > </ Font >< Font  Color ="#0043FF" > </ Font >< Font  Color ="#0047FF" > </ Font >< Font  Color ="#004BFF" > </ Font >< Font  Color ="#004FFF" > </ Font >< Font  Color ="#0053FF" > </ Font >< Font  Color ="#0057FF" > 穿 </ Font >< Font  Color ="#005BFF" > </ Font >< Font  Color ="#005FFF" > </ Font >< Font  Color ="#0063FF" > , </ Font >< Font  Color ="#0067FF" > </ Font >< Font  Color ="#006BFF" > </ Font >< Font  Color ="#006FFF" > </ Font >< Font  Color ="#0073FF" > </ Font >< Font  Color ="#0077FF" > </ Font >< Font  Color ="#007BFF" > </ Font >< Font  Color ="#0080FF" > </ Font >< Font  Color ="#0084FF" > </ Font >< Font  Color ="#0088FF" > </ Font >< Font  Color ="#008CFF" > </ Font >< Font  Color ="#0090FF" > </ Font >< Font  Color ="#0094FF" > </ Font >< Font  Color ="#0098FF" > </ Font >< Font  Color ="#009CFF" > </ Font >< Font  Color ="#00A0FF" > </ Font >< Font  Color ="#00A4FF" > , </ Font >< Font  Color ="#00A8FF" > </ Font >< Font  Color ="#00ACFF" > </ Font >< Font  Color ="#00B0FF" > </ Font >< Font  Color ="#00B4FF" > </ Font >< Font  Color ="#00B8FF" > </ Font >< Font  Color ="#00BCFF" > </ Font >< Font  Color ="#00C0FE" > </ Font >< Font  Color ="#00C0F9" > </ Font >< Font  Color ="#00C0F4" > </ Font >< Font  Color ="#00C0EE" > </ Font >< Font  Color ="#00C0E9" > ? </ Font >< Font  Color ="#00C0E4" > </ Font >< Font  Color ="#00C0DE" > </ Font >< Font  Color ="#00C0D9" > , </ Font >< Font  Color ="#00C0D3" > </ Font >< Font  Color ="#00C0CE" > </ Font >< Font  Color ="#00C0C9" > </ Font >< Font  Color ="#00C0C3" > </ Font >< Font  Color ="#00C0BE" > </ Font >< Font  Color ="#00C0B8" > </ Font >< Font  Color ="#00C0B3" > </ Font >< Font  Color ="#00C0AE" > </ Font >< Font  Color ="#00C0A8" > </ Font >< Font  Color ="#00C0A3" > . </ Font >< Font  Color ="#00C09E" > </ Font >< Font  Color ="#00C098" > </ Font >< Font  Color ="#00C093" > , </ Font >< Font  Color ="#00C08D" > </ Font >< Font  Color ="#00C088" > </ Font >< Font  Color ="#00C083" > </ Font >< Font  Color ="#00C07D" > </ Font >< Font  Color ="#00C078" > </ Font >< Font  Color ="#00C073" > </ Font >< Font  Color ="#00C06D" > </ Font >< Font  Color ="#00C068" > </ Font >< Font  Color ="#00C062" > </ Font >< Font  Color ="#00C05D" > </ Font >< Font  Color ="#00C058" > </ Font >< Font  Color ="#00C052" > </ Font >< Font  Color ="#00C04D" > </ Font >< Font  Color ="#00C048" > </ Font >< Font  Color ="#00C042" > </ Font >< Font  Color ="#00C03D" > </ Font >< Font  Color ="#00C037" > </ Font >< Font  Color ="#00C032" > </ Font >< Font  Color ="#00C02D" > </ Font >< Font  Color ="#00C027" > </ Font >< Font  Color ="#00C022" > </ Font >< Font  Color ="#00C01C" > </ Font >< Font  Color ="#00C017" > </ Font >< Font  Color ="#00C012" > </ Font >< Font  Color ="#00C00C" > </ Font >< Font  Color ="#00C007" > </ Font >< Font  Color ="#00C002" > </ Font >< Font  Color ="#04C000" > </ Font >< Font  Color ="#09C000" > </ Font >< Font  Color ="#0FC000" > </ Font >< Font  Color ="#14C000" > </ Font >< Font  Color ="#19C000" > </ Font >< Font  Color ="#1FC000" > </ Font >< Font  Color ="#24C000" > </ Font >< Font  Color ="#29C000" > </ Font >< Font  Color ="#2FC000" > </ Font >< Font  Color ="#34C000" > </ Font >< Font  Color ="#3AC000" > </ Font >< Font  Color ="#3FC000" > </ Font >< Font  Color ="#44C000" > </ Font >< Font  Color ="#4AC000" > </ Font >< Font  Color ="#4FC000" > </ Font >< Font  Color ="#55C000" > </ Font >< Font  Color ="#5AC000" > </ Font >< Font  Color ="#5FC000" > </ Font >< Font  Color ="#65C000" > </ Font >< Font  Color ="#6AC000" > </ Font >< Font  Color ="#6FC000" > </ Font >< Font  Color ="#75C000" > </ Font >< Font  Color ="#7AC000" > </ Font >< Font  Color ="#80C000" > </ Font >< Font  Color ="#85C000" > </ Font >< Font  Color ="#8AC000" > </ Font >< Font  Color ="#90C000" > </ Font >< Font  Color ="#95C000" > </ Font >< Font  Color ="#9AC000" > </ Font >< Font  Color ="#A0C000" > </ Font >< Font  Color ="#A5C000" > </ Font >< Font  Color ="#ABC000" > </ Font >< Font  Color ="#B0C000" > </ Font >< Font  Color ="#B5C000" > </ Font >< Font  Color ="#BBC000" > </ Font >< Font  Color ="#C0C000" > </ Font >< Font  Color ="#C5C000" > </ Font >< Font  Color ="#CBC000" > </ Font >< Font  Color ="#D0C000" > </ Font >< Font  Color ="#D6C000" > </ Font >< Font  Color ="#DBC000" > , </ Font >< Font  Color ="#E0C000" > 饿 </ Font >< Font  Color ="#E6C000" > </ Font >< Font  Color ="#EBC000" > </ Font >< Font  Color ="#F1C000" > </ Font >< Font  Color ="#F6C000" > </ Font >< Font  Color ="#FBC000" > </ Font >< Font  Color ="#FFBF00" > </ Font >< Font  Color ="#FFBB00" > </ Font >< Font  Color ="#FFB700" > </ Font >< Font  Color ="#FFB300" > </ Font >< Font  Color ="#FFAF00" > </ Font >< Font  Color ="#FFAB00" > </ Font >< Font  Color ="#FFA700" > </ Font >< Font  Color ="#FFA300" > </ Font >< Font  Color ="#FF9E00" > </ Font >< Font  Color ="#FF9A00" > </ Font >< Font  Color ="#FF9600" > </ Font >< Font  Color ="#FF9200" > </ Font >< Font  Color ="#FF8E00" > </ Font >< Font  Color ="#FF8A00" > </ Font >< Font  Color ="#FF8600" > </ Font >< Font  Color ="#FF8200" > </ Font >< Font  Color ="#FF7E00" > </ Font >< Font  Color ="#FF7A00" > </ Font >< Font  Color ="#FF7600" > </ Font >< Font  Color ="#FF7200" > </ Font >< Font  Color ="#FF6E00" > </ Font >< Font  Color ="#FF6A00" > </ Font >< Font  Color ="#FF6600" > </ Font >< Font  Color ="#FF6200" > </ Font >< Font  Color ="#FF5E00" > </ Font >< Font  Color ="#FF5A00" > </ Font >< Font  Color ="#FF5600" > </ Font >< Font  Color ="#FF5200" > </ Font >< Font  Color ="#FF4D00" > </ Font >< Font  Color ="#FF4900" > </ Font >< Font  Color ="#FF4500" > </ Font >< Font  Color ="#FF4100" > </ Font >< Font  Color ="#FF3D00" > </ Font >< Font  Color ="#FF3900" > </ Font >< Font  Color ="#FF3500" > </ Font >< Font  Color ="#FF3100" > </ Font >< Font  Color ="#FF2D00" > </ Font >< Font  Color ="#FF2900" > </ Font >< Font  Color ="#FF2500" > </ Font >< Font  Color ="#FF2100" > </ Font >< Font  Color ="#FF1D00" > </ Font >< Font  Color ="#FF1900" > </ Font >< Font  Color ="#FF1500" > </ Font >< Font  Color ="#FF1100" > </ Font >< Font  Color ="#FF0D00" > </ Font >< Font  Color ="#FF0900" > </ Font >< Font  Color ="#FF0500" > </ Font >< Font  Color ="#FF0000" > </ Font >< Font  Color ="#FF0400" > </ Font >< Font  Color ="#FF0800" > </ Font >< Font  Color ="#FF0C00" > </ Font >< Font  Color ="#FF1000" > </ Font >< Font  Color ="#FF1400" > </ Font >< Font  Color ="#FF1800" > </ Font >< Font  Color ="#FF1C00" > </ Font >< Font  Color ="#FF2000" > </ Font >< Font  Color ="#FF2400" > </ Font >< Font  Color ="#FF2800" > </ Font >< Font  Color ="#FF2C00" > </ Font >< Font  Color ="#FF3000" > </ Font >< Font  Color ="#FF3400" > </ Font >< Font  Color ="#FF3800" > </ Font >< Font  Color ="#FF3C00" > </ Font >< Font  Color ="#FF4000" > </ Font >< Font  Color ="#FF4400" > </ Font >< Font  Color ="#FF4800" > </ Font >< Font  Color ="#FF4C00" > </ Font >< Font  Color ="#FF5100" > </ Font >< Font  Color ="#FF5500" > </ Font >< Font  Color ="#FF5900" > </ Font >< Font  Color ="#FF5D00" > </ Font >< Font  Color ="#FF6100" > </ Font >< Font  Color ="#FF6500" > </ Font >< Font  Color ="#FF6900" > </ Font >< Font  Color ="#FF6D00" > </ Font >< Font  Color ="#FF7100" > </ Font >< Font  Color ="#FF7500" > </ Font >< Font  Color ="#FF7900" > </ Font >< Font  Color ="#FF7D00" > </ Font >< Font  Color ="#FF8100" > </ Font >< Font  Color ="#FF8500" > </ Font >< Font  Color ="#FF8900" > </ Font >< Font  Color ="#FF8D00" > </ Font >< Font  Color ="#FF9100" > </ Font >< Font  Color ="#FF9500" > </ Font >< Font  Color ="#FF9900" > </ Font >< Font  Color ="#FF9D00" > </ Font >< Font  Color ="#FFA200" > </ Font >< Font  Color ="#FFA600" > </ Font >< Font  Color ="#FFAA00" > </ Font >< Font  Color ="#FFAE00" > </ Font >< Font  Color ="#FFB200" > </ Font >< Font  Color ="#FFB600" > </ Font >< Font  Color ="#FFBA00" > </ Font >< Font  Color ="#FFBE00" > </ Font >< Font  Color ="#FCC000" > </ Font >< Font  Color ="#F7C000" > </ Font >< Font  Color ="#F2C000" > </ Font >< Font  Color ="#ECC000" > </ Font >< Font  Color ="#E7C000" > </ Font >< Font  Color ="#E1C000" > </ Font >< Font  Color ="#DCC000" > </ Font >< Font  Color ="#D7C000" > </ Font >< Font  Color ="#D1C000" > </ Font >< Font  Color ="#CCC000" > </ Font >< Font  Color ="#C6C000" > </ Font >< Font  Color ="#C1C000" > </ Font >< Font  Color ="#BCC000" > </ Font >< Font  Color ="#B6C000" > </ Font >< Font  Color ="#B1C000" > </ Font >< Font  Color ="#ACC000" > </ Font >< Font  Color ="#A6C000" > </ Font >< Font  Color ="#A1C000" > </ Font >< Font  Color ="#9BC000" > </ Font >< Font  Color ="#96C000" > </ Font >< Font  Color ="#91C000" > </ Font >< Font  Color ="#8BC000" > </ Font >< Font  Color ="#86C000" > </ Font >< Font  Color ="#81C000" > </ Font >< Font  Color ="#7BC000" > </ Font >< Font  Color ="#76C000" > </ Font >< Font  Color ="#70C000" > </ Font >< Font  Color ="#6BC000" > </ Font >< Font  Color ="#66C000" > </ Font >< Font  Color ="#60C000" > </ Font >< Font  Color ="#5BC000" > </ Font >< Font  Color ="#55C000" > </ Font >< Font  Color ="#50C000" > </ Font >< Font  Color ="#4BC000" > </ Font >< Font  Color ="#45C000" > </ Font >< Font  Color ="#40C000" > </ Font >< Font  Color ="#3BC000" > </ Font >< Font  Color ="#35C000" > </ Font >< Font  Color ="#30C000" > </ Font >< Font  Color ="#2AC000" > </ Font >< Font  Color ="#25C000" > </ Font >< Font  Color ="#20C000" > </ Font >< Font  Color ="#1AC000" > </ Font >< Font  Color ="#15C000" > </ Font >< Font  Color ="#10C000" > </ Font >< Font  Color ="#0AC000" > </ Font >< Font  Color ="#05C000" > </ Font >< Font  Color ="#00C001" > </ Font >< Font  Color ="#00C006" > </ Font >< Font  Color ="#00C00B" > </ Font >< Font  Color ="#00C011" > </ Font >< Font  Color ="#00C016" > </ Font >< Font  Color ="#00C01B" > </ Font >< Font  Color ="#00C021" > </ Font >< Font  Color ="#00C026" > </ Font >< Font  Color ="#00C02C" > </ Font >< Font  Color ="#00C031" > </ Font >< Font  Color ="#00C036" > </ Font >< Font  Color ="#00C03C" > </ Font >< Font  Color ="#00C041" > </ Font >< Font  Color ="#00C047" > </ Font >< Font  Color ="#00C04C" > </ Font >< Font  Color ="#00C051" > </ Font >< Font  Color ="#00C057" > </ Font >< Font  Color ="#00C05C" > </ Font >< Font  Color ="#00C061" > </ Font >< Font  Color ="#00C067" > </ Font >< Font  Color ="#00C06C" > </ Font >< Font  Color ="#00C072" > </ Font >< Font  Color ="#00C077" > </ Font >< Font  Color ="#00C07C" > </ Font >< Font  Color ="#00C082" > </ Font >< Font  Color ="#00C087" > </ Font >< Font  Color ="#00C08C" > </ Font >< Font  Color ="#00C092" > </ Font >< Font  Color ="#00C097" > </ Font >< Font  Color ="#00C09D" > </ Font >< Font  Color ="#00C0A2" > </ Font >< Font  Color ="#00C0A7" > </ Font >< Font  Color ="#00C0AD" > </ Font >< Font  Color ="#00C0B2" > </ Font >< Font  Color ="#00C0B7" > </ Font >< Font  Color ="#00C0BD" > </ Font >< Font  Color ="#00C0C2" > </ Font >< Font  Color ="#00C0C8" > </ Font >< Font  Color ="#00C0CD" > </ Font >< Font  Color ="#00C0D2" > </ Font >< Font  Color ="#00C0D8" > </ Font >< Font  Color ="#00C0DD" > </ Font >< Font  Color ="#00C0E3" > </ Font >< Font  Color ="#00C0E8" > </ Font >< Font  Color ="#00C0ED" > </ Font >< Font  Color ="#00C0F3" > </ Font >< Font  Color ="#00C0F8" > </ Font >< Font  Color ="#00C0FD" > </ Font >< Font  Color ="#00BDFF" > </ Font >< Font  Color ="#00B9FF" > </ Font >< Font  Color ="#00B5FF" > </ Font >< Font  Color ="#00B1FF" > </ Font >< Font  Color ="#00ADFF" > </ Font >< Font  Color ="#00A9FF" > </ Font >< Font  Color ="#00A5FF" > </ Font >< Font  Color ="#00A1FF" > </ Font >< Font  Color ="#009DFF" > </ Font >< Font  Color ="#0099FF" > </ Font >< Font  Color ="#0095FF" > </ Font >< Font  Color ="#0091FF" > </ Font >< Font  Color ="#008DFF" > </ Font >< Font  Color ="#0089FF" > </ Font >< Font  Color ="#0085FF" > </ Font >< Font  Color ="#0080FF" > </ Font >< Font  Color ="#007CFF" > </ Font >< Font  Color ="#0078FF" > </ Font >< Font  Color ="#0074FF" > </ Font >< Font  Color ="#0070FF" > </ Font >< Font  Color ="#006CFF" > </ Font >< Font  Color ="#0068FF" > </ Font >< Font  Color ="#0064FF" > </ Font >< Font  Color ="#0060FF" > </ Font >< Font  Color ="#005CFF" > </ Font >< Font  Color ="#0058FF" > </ Font >< Font  Color ="#0054FF" > </ Font >< Font  Color ="#0050FF" > </ Font >< Font  Color ="#004CFF" > </ Font >< Font  Color ="#0048FF" > </ Font >< Font  Color ="#0044FF" > </ Font >< Font  Color ="#0040FF" > </ Font >< Font  Color ="#003CFF" > </ Font >< Font  Color ="#0038FF" > </ Font >< Font  Color ="#0034FF" > </ Font >< Font  Color ="#002FFF" > </ Font >< Font  Color ="#002BFF" > </ Font >< Font  Color ="#0027FF" > </ Font >< Font  Color ="#0023FF" > </ Font >< Font  Color ="#001FFF" > </ Font >< Font  Color ="#001BFF" > </ Font >< Font  Color ="#0017FF" > </ Font >< Font  Color ="#0013FF" > </ Font >< Font  Color ="#000FFF" > </ Font >< Font  Color ="#000BFF" > </ Font >< Font  Color ="#0007FF" > </ Font >< Font  Color ="#0003FF" > </ Font >< Font  Color ="#0200FF" > </ Font >< Font  Color ="#0700FF" > </ Font >< Font  Color ="#0C00FF" > </ Font >< Font  Color ="#1200FF" > </ Font >< Font  Color ="#1700FF" > </ Font >< Font  Color ="#1D00FF" > </ Font >< Font  Color ="#2200FF" > </ Font >< Font  Color ="#2700FF" > </ Font >< Font  Color ="#2D00FF" > </ Font >< Font  Color ="#3200FF" > </ Font >< Font  Color ="#3700FF" > </ Font >< Font  Color ="#3D00FF" > </ Font >< Font  Color ="#4200FF" > </ Font >< Font  Color ="#4800FF" > </ Font >< Font  Color ="#4D00FF" > </ Font >< Font  Color ="#5200FF" > </ Font >< Font  Color ="#5800FF" > </ Font >< Font  Color ="#5D00FF" > </ Font >< Font  Color ="#6200FF" > </ Font >< Font  Color ="#6800FF" > </ Font >< Font  Color ="#6D00FF" > </ Font >< Font  Color ="#7300FF" > </ Font >< Font  Color ="#7800FF" > </ Font >< Font  Color ="#7D00FF" > </ Font >< Font  Color ="#8300FF" > </ Font >< Font  Color ="#8800FF" > </ Font >< Font  Color ="#8E00FF" > </ Font >< Font  Color ="#9300FF" > </ Font >< Font  Color ="#9800FF" > </ Font >< Font  Color ="#9E00FF" > </ Font >< Font  Color ="#A300FF" > </ Font >< Font  Color ="#A800FF" > </ Font >< Font  Color ="#AE00FF" > </ Font >< Font  Color ="#B300FF" > </ Font >< Font  Color ="#B900FF" > </ Font >< Font  Color ="#BE00FF" > </ Font >< Font  Color ="#C300FF" > </ Font >< Font  Color ="#C900FF" > </ Font >< Font  Color ="#CE00FF" > </ Font >< Font  Color ="#D300FF" > </ Font >< Font  Color ="#D900FF" > </ Font >< Font  Color ="#DE00FF" > </ Font >< Font  Color ="#E400FF" > </ Font >< Font  Color ="#E900FF" > </ Font >< Font  Color ="#EE00FF" > </ Font >< Font  Color ="#F400FF" > </ Font >< Font  Color ="#F900FF" > </ Font >   </ Font >
</ p ></ marquee ></ td >
  
</ tr >
</ table >
< table  width ="179"  height ="178"  border ="0"  cellpadding ="0"  cellspacing ="0" >
  
< tr >
    
< td  width ="179" >< marquee  width ="179"  height ="150"  scrollamount ="1"  scrolldelay ="1"  onMouseOver ="stop()"  onMouseOut ="start()" >
< div  id ="test" > 临渊羡鱼,不如退而结网。 </ div >
    
</ marquee ></ td >
  
</ tr >
</ table >
< br >
< style ="color:green;border-bottom:1px solid #ff0000;padding-bottom:2px;font-family:楷体_GB2312;font-size:16px;" >< marquee  width ="220px"  behavior ="alternate" >< b > 今天的处境是做过无数选择后的结果。 </ b ></ marquee ></ u >
< br >< br >
< style >
.shakeimage
{
position
: relative
}
</ style >
< script  language ="JavaScript1.2" >
/*
Shake image script (onMouseover)- 
?Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
// configure shake degree (where larger # equals greater shake)
var  rector = 3
// /////DONE EDITTING///////////
var  stopit = 0  
var  a = 1
function  init(which){
stopit
= 0
shake
= which
shake.style.left
= 0
shake.style.top
= 0
}
function  rattleimage(){
if  (( ! document.all &&! document.getElementById) || stopit == 1 )
return
if  (a == 1 ){
shake.style.top
= parseInt(shake.style.top) + rector
}
else   if  (a == 2 ){
shake.style.left
= parseInt(shake.style.left) + rector
}
else   if  (a == 3 ){
shake.style.top
= parseInt(shake.style.top) - rector
}
else {
shake.style.left
= parseInt(shake.style.left) - rector
}
if  (a < 4 )
a
++
else
a
= 1
setTimeout(
" rattleimage() " , 50 )
}
function  stoprattle(which){
stopit
= 1
which.style.left
= 0
which.style.top
= 0
}
</ script >
< img  src ="http://bbs.blueidea.com/images/blue/smilies/eek.gif"  class ="shakeimage"  onMouseover ="init(this);rattleimage()"  onMouseout ="stoprattle(this)" >

你可能感兴趣的:(代码)