代码如下:希望滚动5秒后,停顿2秒,然后在滚动5秒,在停顿2秒,一直这样循环哪位兄弟,可以指点一下,谢谢<div id="demo" style="OVERFLOW: hidden; WIDTH: 560px; COLOR: #ffffff; HEIGHT:">
<table cellspacing="2" cellpadding="2" align="center" border="0"
cellspace="0">
<tbody>
<tr>
<td id="demo1" valign="top" width="515"><table width="570" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16" class="indextopen"> </td>
<td width="170" class="indextopen"><strong><a href="product.asp">贵金属粉及锭</a></strong></td>
<td width="22" rowspan="3"><img src="images/indexline.jpg" width="3" height="91" /></td>
<td width="170"><span class="indextopen"><strong>贵金属合金</strong></span></td>
<td width="22" rowspan="3"><img src="images/indexline.jpg" width="3" height="91" /></td>
<td width="170"><span class="indextopen"><strong>贵金属试剂</strong></span></td>
</tr>
<tr class="indextopen">
<td width="16" height="12"> </td>
<td width="170" height="12"> </td>
<td width="170" height="12"> </td>
<td width="170" height="12"> </td>
</tr>
<tr>
<td width="16" class="indextopen"> </td>
<td width="170" valign="top" class="indextopcnzhenwen">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</td>
<td width="170" valign="top"><span class="indextopcnzhenwen">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top"><span class="indextopcnzhenwen">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
</tr>
</table></td>
<td id="demo2" valign="top"
width="32"></td>
</tr>
</tbody>
</table>
</div>
<script>
var speed=1//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee()
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else
{
demo.scrollLeft++
}
} setInterval(Marquee,speed)
//setInterval(Marquee,speed)
//demo.onmouseover=function() {clearInterval(MyMar)}
//demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
<table cellspacing="2" cellpadding="2" align="center" border="0"
cellspace="0">
<tbody>
<tr>
<td id="demo1" valign="top" width="515"><table width="570" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16" class="indextopen"> </td>
<td width="170" class="indextopen"><strong><a href="product.asp">贵金属粉及锭</a></strong></td>
<td width="22" rowspan="3"><img src="images/indexline.jpg" width="3" height="91" /></td>
<td width="170"><span class="indextopen"><strong>贵金属合金</strong></span></td>
<td width="22" rowspan="3"><img src="images/indexline.jpg" width="3" height="91" /></td>
<td width="170"><span class="indextopen"><strong>贵金属试剂</strong></span></td>
</tr>
<tr class="indextopen">
<td width="16" height="12"> </td>
<td width="170" height="12"> </td>
<td width="170" height="12"> </td>
<td width="170" height="12"> </td>
</tr>
<tr>
<td width="16" class="indextopen"> </td>
<td width="170" valign="top" class="indextopcnzhenwen">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</td>
<td width="170" valign="top"><span class="indextopcnzhenwen">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top"><span class="indextopcnzhenwen">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
</tr>
</table></td>
<td id="demo2" valign="top"
width="32"></td>
</tr>
</tbody>
</table>
</div>
<script>
var speed=1//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee()
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else
{
demo.scrollLeft++
}
} setInterval(Marquee,speed)
//setInterval(Marquee,speed)
//demo.onmouseover=function() {clearInterval(MyMar)}
//demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
{
speed = speed==2 ? 5 : 2;
...
}
var speed=1;//速度数值越大速度越慢
demo2.innerHTML = demo1.innerHTML;
c = 0;
function Marquee()
{
if(demo2.offsetWidth-demo.scrollLeft<=0) demo.scrollLeft-=demo1.offsetWidth;
else demo.scrollLeft++;
c++;
if(c >= 300)
{
clearInterval(mI);
setTimeout("doI()",2000);
c = 0;
}
}
function doI()
{
mI = setInterval("Marquee(c)",speed);
}
doI();
</script>
td {font-size:9pt;}
</style><script>
function checkLoop(obj, bound) {
obj.count++;
if (obj.count==bound) {
obj.count=0;
obj.stop();
window.setTimeout(obj.uniqueID + ".start()", 2000);
}
}
</script><marquee DIRECTION=left width=600 height=60 scrolldelay=100 onscroll="checkLoop(this, this.width / this.scrollAmount)" count=0 scrollamount=10 loop=-1>
<table width=1200 border=0 cellspacing=0 cellpadding=0>
<tr>
<td width="30" rowspan="2"> </td>
<td width="170"><a href="product.asp">贵金属粉及锭</a></strong></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属合金</strong></span></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属试剂</strong></span></td>
<td width="30" rowspan="2"> </td>
<td width="170"><a href="product.asp">贵金属粉及锭1</a></strong></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属合金2</strong></span></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属试剂3</strong></span></td>
</tr>
<tr>
<td width="170" valign="top">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
</tr>
</table>
</marquee><br><marquee DIRECTION=up width=600 height=100 scrolldelay=100 onscroll="checkLoop(this, this.height / this.scrollAmount)" count=0 scrollamount=10 loop=-1>
<table width=600 border=0 cellspacing=0 cellpadding=0>
<tr height=30>
<td width="30" rowspan="2"> </td>
<td width="170"><a href="product.asp">贵金属粉及锭</a></strong></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属合金</strong></span></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属试剂</strong></span></td>
</tr>
<tr height=70>
<td width="170" valign="top">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
</tr>
<tr height=30>
<td width="30" rowspan="2"> </td>
<td width="170"><a href="product.asp">贵金属粉及锭1</a></strong></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属合金2</strong></span></td>
<td width="30" rowspan="2"> </td>
<td width="170"><span class="indextopen"><strong>贵金属试剂3</strong></span></td>
</tr>
<tr height=70>
<td width="170" valign="top">标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
<td width="170" valign="top"><span>标准:ISO9002企业标准<br />
说明:常温下密封需干燥保存 <br />
性状:黑色粉末</span></td>
</tr>
</table>
</marquee>
<script>
function checkLoop(obj, bound) {
obj.count++;
if (obj.count>=bound) {
obj.count=0;
obj.stop();
window.setTimeout(obj.uniqueID + ".start()", 2000);
}
}
</script>