自动切换图片代码

首先向图片文件中添加一个flash

下载这个flash

<!--焦点图开始-->
                        <SCRIPT type=text/javascript>
 <!--
 
 var focus_width=770
 var focus_height=257
 var text_height=0
 var swf_height = focus_height+text_height
 
 var pics='images/3.jpg|images/2.jpg|images/4.jpg|images/1.jpg'
var links='||||'

 var texts='||||'
 
 document.write('<object classid="" codebase="" width="'+ focus_width +'" height="'+ swf_height +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/pixviewer[1].swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
 document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
 document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
 document.write('<embed src="images/pixviewer[1].swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="" />');  document.write('</object>');
 
 //-->
 </SCRIPT>
<!--焦点图结束-->

原文地址:https://www.cnblogs.com/wenming205/p/1224494.html