- <table cellspacing="0" width="100%" align="center">
-
<tr>
-
<td align="center" width="100%">
-
-
<div id="adscroll" style="overflow:hidden;height:12px;width:100%;text-align:center;float:left;">
-
<div id="adinner1">
-
-
-
<a href="" target="_blank">
-
<font color="green">当当网新书上架:俺是山东蓬莱人,梦回故乡~!已经卖断货,预购从速!</a></font>
-
<br/><br/>
-
<a href="" target="_blank">
-
<font color="green">当当网新书上架:俺是山东蓬莱人,梦回故乡~!已经卖断货,预购从速!</a></font>
-
<br/><br/>
-
<a href="" target="_blank">
-
<font color="green">当当网新书上架:俺是山东蓬莱人,梦回故乡~!已经卖断货,预购从速!</a></font>
-
<br/><br/>
-
-
</div>
-
<div id="adinner2"></div>
-
</div>
-
</td>
-
</tr>
-
<table>
-
-
<script language="javascript">
-
var speed=98;
-
var adinner2=document.getElementById("adinner2");
-
var adinner1=document.getElementById("adinner1");
-
var adscroll=document.getElementById("adscroll");
-
adinner2.innerHTML=adinner1.innerHTML;
-
function Marquee(){
-
if(adinner2.offsetTop-adscroll.scrollTop<=0){
-
adscroll.scrollTop-=adinner1.offsetHeight;
-
}else{
-
adscroll.scrollTop++;
-
}
-
}
-
var adMarquee=setInterval(Marquee,speed);
-
adscroll.onmouseover=function(){clearInterval(adMarquee)};
-
adscroll.onmouseout=function(){Marquee=setInterval(adMarquee,speed)};
- </script>
2:文字图片向左滚动
- <table cellspacing="0" width="100%" align="center">
-
<tr>
-
<td align="center" width="100%">
-
-
<div id="adscroll" style="overflow:hidden;height:120px;width:300px;text-align:center;float:left;">
-
<div id="adscrollX" style="float:left;width:800%;">
-
<div id="adinner1" style="float:left;">
-
-
-
<a href="" target="_blank">
-
<font color="green">当当网新书上架:俺是山东蓬莱人,梦回故乡~!已经卖断货,预购从速!</a></font>
-
<br/><br/>
-
<a href="" target="_blank">
-
<font color="green">当当网新书上架:俺是山东蓬莱人,梦回故乡~!已经卖断货,预购从速!</a></font>
-
<br/><br/>
-
<a href="" target="_blank">
-
<font color="green">当当网新书上架:俺是山东蓬莱人,梦回故乡~!已经卖断货,预购从速!</a></font>
-
<br/><br/>
-
-
</div>
-
<div id="adinner2" style="float:left;"></div>
-
</div>
-
</div>
-
</td>
-
</tr>
-
<table>
-
-
<script language="javascript">
-
var speed=28;
-
var adinner2=document.getElementById("adinner2");
-
var adinner1=document.getElementById("adinner1");
-
var adscroll=document.getElementById("adscroll");
-
adinner2.innerHTML=adinner1.innerHTML;
-
function Marquee(){
-
if(adinner2.offsetWidth-adscroll.scrollLeft<=0){
-
adscroll.scrollLeft-=adinner1.offsetWidth;
-
}else{
-
adscroll.scrollLeft++;
-
}
-
}
-
var adMarquee=setInterval(Marquee,speed);
-
adscroll.onmouseover=function(){clearInterval(adMarquee)};
-
adscroll.onmouseout=function()adMarquee=setInterval(Marquee,speed)};
- </script>
3: