日期:2014-05-17 浏览次数:20496 次
<script type="text/javascript"> var focus_width = 229; var focus_height = 188; var focus_height = 188; var text_height = 23; var swf_height = focus_height + text_height; var swf_height = focus_height; [color=#FF0000] var pics = "<%= gundongpic %>";[/color] var texts = "|||"; var links = "Default.aspx|Default.aspx|Default.aspx|Default.aspx"; var keyword = "||||"; document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">'); document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="flash/pix.swf"><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=&keyword=' + keyword + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">'); document.write('<embed src="flash/pix.swf" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=&keyword=' + keyword + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#eeeeee" quality="high" width="' + focus_width + '" height="' + swf_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>'); </script>
------解决方案--------------------
1.JS
2.Flash
3.ASP.NET中的Adrotator控件
------解决方案--------------------
/*
*此全部代码存为html可直接使用,或jsp中引用
*/
var widths=250; /*显示高度*/
var heights=150; /*显示宽度*/
var counts=5; /*照片数量*/
/**
*如果你是不固定的图片,可以使用数组定义,
让然下面一些代码也要有相应的改动,不多介绍,如果你不会可以问我。