js代码加了3c标准后就不滚动了,帮看下哪里不符合3C标准。去掉顶部“标准”那句话就行了,现在要用到“标准”<!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=utf-8" />
<title></title>
    <style>
    A {
    COLOR: #333333; TEXT-DECORATION: none ;border-bottom:1px dotted
    }
    A:hover {
    COLOR: #333333; background-color:#C0FFFF;
    }
    td {
    FONT-SIZE: 9pt; FONT-FAMILY: "Verdana"; color:#3333333;letter-spacing : 1pt ;line-
    height :14pt}
    </style>
</head>    
    <body>
    <center>
    <table width=380 bgcolor=#f7f8f9 border=0 cellspacing=0 style="border:#cccccc 1px solid;"
    height="18"><tr><td><div id="icefable1" style="width:500;">
    <TABLE cellSpacing=0 cellPadding=0 border=0 height="18"><TBODY><TR><TD
    width=201 height=18>·<A href="#" target=_blank>是时候给家里安装无线网络啦
    </A></TD><TD width=177 height=18>·<A
    href="#" target=_blank>小巧图片颜色替换处理
    </A></TD></TR><TR><TD height=18>·<A
    href="#" target=_blank>电脑,数码硬件类图标,ICO版</A></TD><TD height=18>·<A
    href="#" target=_blank>PC 上演绎 MAC 神话 !
    </A></TD></TR><TR><TD height=18>·<A
    href="#" target=_blank>六种完美解决显示器问题方法</A> </TD><TD height=18><A
    href="#" target=_blank>·Free仔靓卡损失惨重!多图</A></TD></TR></TBODY></TABLE>
    </div>
    <div id="icefable2" style="position:absolute;z-
    index:1;visibility:hidden"></div>
    </td>
    </tr>
    </table>
    <script>
    marqueesHeight=18;
    stopscroll=false;
    icefable1.scrollTop=0;
    with(icefable1){
    style.width=0;
    style.height=marqueesHeight;
    style.overflowX="visible";
    style.overflowY="hidden";
    noWrap=true;
    onmouseover=new Function("stopscroll=true");
    onmouseout=new Function("stopscroll=false");
    }
    preTop=0; currentTop=0; stoptime=0;
    function init_srolltext(){
    icefable2.innerHTML="";
    icefable2.innerHTML+=icefable1.innerHTML;
    icefable1.innerHTML=icefable2.innerHTML+icefable2.innerHTML;
    setInterval("scrollUp()",50);
    }
    function scrollUp(){
    if(stopscroll==true) return;
    currentTop+=1;
    if(currentTop==19)
    {
    stoptime+=1;
    currentTop-=1;
    if(stoptime==50)
    {
    currentTop=0;
    stoptime=0;
    }
    }
    else {
    preTop=icefable1.scrollTop;
    icefable1.scrollTop+=1;
    if(preTop==icefable1.scrollTop){
    icefable1.scrollTop=icefable2.offsetHeight-marqueesHeight;
    icefable1.scrollTop+=1;
    }
    }
    }
    init_srolltext();
    </script>
    </center>    </body>
</html>

解决方案 »

  1.   

    我来吧...<!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=utf-8" />
    <title></title>
    <style>
    A {
    COLOR: #333333;
    TEXT-DECORATION: none;
    border-bottom: 1px dotted
    }A:hover {
    COLOR: #333333;
    background-color: #C0FFFF;
    }td {
    FONT-SIZE: 9pt;
    FONT-FAMILY: "Verdana";
    color: #3333333;
    letter-spacing: 1pt;
    line-
    height
    :
    14pt
    }
    </style>
    </head>
    <body>
    <center>
    <table width=380 bgcolor=#f7f8f9 border=0 cellspacing=0
    style="border: #cccccc 1px solid;" height="18">
    <tr>
    <td><div id="icefable1" style="width: 500;">
    <TABLE cellSpacing=0 cellPadding=0 border=0 height="18">
    <TBODY>
    <TR>
    <TD width=201 height=18>·<A href="#" target=_blank>是时候给家里安装无线网络啦
    </A>
    </TD>
    <TD width=177 height=18>·<A href="#" target=_blank>小巧图片颜色替换处理
    </A>
    </TD>
    </TR>
    <TR>
    <TD height=18>·<A href="#" target=_blank>电脑,数码硬件类图标,ICO版</A>
    </TD>
    <TD height=18>·<A href="#" target=_blank>PC 上演绎 MAC 神话
    ! </A>
    </TD>
    </TR>
    <TR>
    <TD height=18>·<A href="#" target=_blank>六种完美解决显示器问题方法</A>
    </TD>
    <TD height=18><A href="#" target=_blank>·Free仔靓卡损失惨重!多图</A>
    </TD>
    </TR>
    </TBODY>
    </TABLE>
    </div>
    <div id="icefable2"
    style="position: absolute; z- index: 1; visibility: hidden"></div>
    </td>
    </tr>
    </table>
    <script>
    marqueesHeight = 18;
    stopscroll = false;
    icefable1.scrollTop = 0;
    with (icefable1) {
    style.width = 0;
    style.height = marqueesHeight;
    style.overflowX = "visible";
    style.overflowY = "hidden";
    noWrap = true;
    onmouseover = new Function("stopscroll=true");
    onmouseout = new Function("stopscroll=false");
    }
    preTop = 0;
    currentTop = 0;
    stoptime = 0;
    function init_srolltext() {
    icefable2.innerHTML = "";
    icefable2.innerHTML += icefable1.innerHTML;
    icefable1.innerHTML = icefable2.innerHTML + icefable2.innerHTML;
    setInterval("scrollUp()", 50);
    }
    function scrollUp() {
    if (stopscroll == true)
    return;
    currentTop += 1;
    if (currentTop == 19) {
    stoptime += 1;
    currentTop -= 1;
    if (stoptime == 50) {
    currentTop = 0;
    stoptime = 0;
    }
    } else {
    preTop = icefable1.scrollTop;
    icefable1.scrollTop += 1;
    if (preTop == icefable1.scrollTop) {
    icefable1.scrollTop = icefable2.offsetHeight
    - marqueesHeight;
    icefable1.scrollTop += 1;
    }
    }
    }
    init_srolltext();
    </script>
    </center></body>
    </html>