源码下载地址:
http://download.csdn.net/source/923503
- <!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>
- <title>常用滚动广告</title>
- </head>
- <body>
- <div>top
- </div>
- <div>
- <script type="text/javascript">
- imgUrl1="images/01.jpg";
- imgtext1="大浪淘沙01"
- imgLink1=escape("http://www.lydlts.com");
- imgUrl2="images/02.jpg";
- imgtext2="大浪淘沙02"
- imgLink2=escape("http://www.lydlts.com");
- var focus_width=261
- var focus_height=167
- var text_height=20//文本高度,设置为0再不显示
- var swf_height = focus_height+text_height
- var pics=imgUrl1+"|"+imgUrl2
- var links=imgLink1+"|"+imgLink2
- var texts=imgtext1+"|"+imgtext2
- document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
- document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
- document.write('width="'+ focus_width +'" height="'+ swf_height +'">');//设置高度宽度
- document.write('<param name="allowScriptAccess" value="sameDomain">');
- document.write('<param name="movie" value="images/focus1.swf">');//设置用来播放的动画
- document.write('<param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');//设置背景
- document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
- document.write('<param name="FlashVars" value="pics='+pics+'links='+links+'texts='+texts);
- document.write('borderwidth='+focus_width+'borderheight='+focus_height+'textheight='+text_height+'">');
- document.write('</object>');
- </script>
- </div>
- <div>end</div>
- </body>
- </html>