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>
<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>
解决方案 »
- 一个小游戏
- document.write("start");//这句不写js不执行,为什么?
- 因为flash文件有2,3M,用页面直接打开一个flash文件时比较慢,加载前会长时间空白
- 请教用过Antechinus JavaScript Editor 9的大侠们有关debug功能的问题!
- DOM的问题,高手进来帮帮忙啊
- 怎么才能让这个代码跳过IE拦截?
- 怎么获取子框架中 复选框和 单选(radio)的值?在线等!
- 如何由form object获得其owner document
- Why the script can not run?
- 为什么这样会错啊
- 搜索提示菜单 上下键取值 怎么屏蔽滚动条
- 求教JQuery
<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>