首頁 >後端開發 >php教程 >,图片轮播代码无法显示

,图片轮播代码无法显示

WBOY
WBOY原創
2016-06-23 13:34:27953瀏覽

我把代码引入工程的smarty,图片和其他资源都放入的templates目录

{literal}	<script type="text/javascript">		var focus_width=1113		var focus_height=450		var text_height=0		var swf_height = focus_height+text_height		var pics='{$t_dir}images/banner1.jpg|{$t_dir}images/banner2.jpg|{$t_dir}images/banner3.jpg|{$t_dir}images/banner4.jpg'	var links='||'	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="js/pixviewer.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="js/pixviewer.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="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');		document.write('</object>');	</script>	{/literal}


回复讨论(解决方案)

这个需要你到浏览器的调试状态下看看有没出错,再看看输出的HTML部分是否有问题...

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn