左右两边浮动广告特效代码 dn001 2009-06-21 08:53:32 <!--head区域内代码--> <head> <SCRIPT language=JavaScript type=text/JavaScript> <!-- //more javascript from http://www.knowsky.com var sh; marqueesWidth=610; preLeft=0; currentLeft=0; stopscroll=false; getlimit=0;preTop=0; currentTop=0; function scrollLeft() { if(stopscroll==true) return; preLeft=marquees.scrollLeft; marquees.scrollLeft+=2; if(preLeft==marquees.scrollLeft) { //marquees.scrollLeft=templayer.offsetWidth-marqueesWidth+1; } } function scrollRight() { if(stopscroll==true) return; preLeft=marquees.scrollLeft; marquees.scrollLeft-=2; if(preLeft==marquees.scrollLeft) { if(!getlimit) { marquees.scrollLeft=templayer.offsetWidth*2; getlimit=marquees.scrollLeft; } marquees.scrollLeft-=1; } } function Left() { stopscroll = false; sh = setInterval("scrollLeft()",20); } function Right() { stopscroll = false; sh = setInterval("scrollRight()",20); } function StopScroll() { stopscroll = true; clearInterval( sh ); } function SelectType(value) { document.all.sendForm.page.value = 1; document.all.sendForm.type.value = value; document.all.sendForm.submit(); } function init() { with(marquees) { style.height=0; style.width=marqueesWidth; style.overflowX="hidden"; style.overflowY="visible"; style.align = "center"; noWrap=true; } } //--> </SCRIPT> </head> <!--body区域内代码--> <body onload="init()"> <TABLE cellSpacing=1 width=660 align=center border=0> <TR bgColor=#f8f8f8> <TD align=middle width=25><IMG src="http://www.knowsky.com/upfiles/20050905/20050905085723_left.gif" border=0 onmouseout=StopScroll() onmouseover=Left() style="CURSOR: pointer"></TD> <TD> <DIV id=marquees> <TABLE border=0><TR> <TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406301.jpg' border=0></td> </tr><tr><td><div align="center">第1期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406302.jpg' border=0></td> </tr><tr><td><div align="center">第2期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406303.jpg' border=0></td> </tr><tr><td><div align="center">第1期 </div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406304.jpg' border=0></td> </tr><tr><td><div align="center">第1期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406305.jpg' border=0></td> </tr><tr><td><div align="center">第2期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406304.jpg' border=0></td> </tr><tr><td><div align="center">第3期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406305.jpg' border=0></td> </tr><tr><td><div align="center">第4期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406302.jpg' border=0></td> </tr><tr><td><div align="center">第5期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406301.jpg' border=0></td> </tr><tr><td><div align="center">第6期</div></td> </tr></table></TD><TD align=middle width=85><table cellSpacing=0 cellPadding=0 align=center border=0><tr><td><IMG class=imgframe src='http://www.knowsky.com/img/200406303.jpg' border=0></td> </tr><tr><td><div align="center">第7期</div></td> </tr></table></TD> </TR></TABLE></DIV> <DIV id=templayer style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"></DIV></TD> <TD align=middle width=25><IMG src="http://www.knowsky.com/upfiles/20050905/20050905085729_right.gif" border=0 onmouseout=StopScroll() onmouseover=Right() style="CURSOR: pointer"></TD> </TR></TABLE> </body>