一段关于图片轮播的javascript代码,求大神指点!!!急求,坐等!!
这是我从网上拷贝下来的代码,但我想替换里面的轮播图片,应该怎么改,求大神帮我讲解一下这段代码!!!<body><divclass="bianhuan"><!--变换图片开...
这是我从网上拷贝下来的代码,但我想替换里面的轮播图片,应该怎么改,求大神帮我讲解一下这段代码!!!
<body>
<div class="bianhuan"><!--变换图片开始-->
<script type="text/javascript">
var focus_width=340
var focus_height=182
var text_height=0
var swf_height = focus_height+text_height
var pics='http://s4.51cto.com/wyfs01/M01/15/94/wKioJlIMoZDyfj4QAAEjpUt3jYo240.jpg|http://s5.51cto.com/wyfs01/M00/15/8F/wKioJlIMZDCgFgsRAACZkTn_QKw004.jpg|http://s5.51cto.com/wyfs01/M00/15/8F/wKioJlIMZC_zo4JUAACRG3w_S5U140.jpg|http://s5.51cto.com/wyfs01/M01/15/91/wKioOVIMZC-jSElUAACJW3M3LqU313.jpg|http://s4.51cto.com/wyfs01/M01/15/8F/wKioJlIMZC-Ak6FSAABYKoj1TBM849.jpg'
var links=escape('http://datacenter.watchstor.com/news-144959.htm|http://developer.51cto.com/art/201308/407073.htm|http://mobile.51cto.com/android-407018.htm|http://os.51cto.com/art/201308/407060.htm|http://cloud.51cto.com/art/201308/407042.htm')
var texts=''
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="http://www.51cto.com/images/pixviewer.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='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="http://www.51cto.com/images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" 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>
<!--变换图片结束--></div>
</body> 展开
<body>
<div class="bianhuan"><!--变换图片开始-->
<script type="text/javascript">
var focus_width=340
var focus_height=182
var text_height=0
var swf_height = focus_height+text_height
var pics='http://s4.51cto.com/wyfs01/M01/15/94/wKioJlIMoZDyfj4QAAEjpUt3jYo240.jpg|http://s5.51cto.com/wyfs01/M00/15/8F/wKioJlIMZDCgFgsRAACZkTn_QKw004.jpg|http://s5.51cto.com/wyfs01/M00/15/8F/wKioJlIMZC_zo4JUAACRG3w_S5U140.jpg|http://s5.51cto.com/wyfs01/M01/15/91/wKioOVIMZC-jSElUAACJW3M3LqU313.jpg|http://s4.51cto.com/wyfs01/M01/15/8F/wKioJlIMZC-Ak6FSAABYKoj1TBM849.jpg'
var links=escape('http://datacenter.watchstor.com/news-144959.htm|http://developer.51cto.com/art/201308/407073.htm|http://mobile.51cto.com/android-407018.htm|http://os.51cto.com/art/201308/407060.htm|http://cloud.51cto.com/art/201308/407042.htm')
var texts=''
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="http://www.51cto.com/images/pixviewer.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='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="http://www.51cto.com/images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" 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>
<!--变换图片结束--></div>
</body> 展开
2013-08-16
展开全部
字符串pics是图片地址
字符串links是链接地址
地址间使用|号分隔
字符串links是链接地址
地址间使用|号分隔
追问
为什么我将http://s4.51cto.com/wyfs01/M01/15/94/wKioJlIMoZDyfj4QAAEjpUt3jYo240.jpg换成file:///D:/oo/image/1.jpg之后用浏览器预览,我替换后的图片不能显示,其余的却一切正常?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询