我在后台——门户——模块管理中添加一数据调用。在模块模板中使用swf显示调用数据,最终不显示图。
模块模板代码如下:
- <div class="tm-jdt"><script language='javascript'>
- var swf_width=300;
- var swf_height=250;
- var files = "[index=1]{pic}[/index][loop]|{pic}[/loop]";
- var links = "[index1=1]{url}[/index1][loop1]|{url}[/loop1]";
- var texts = "[index2=1]{title}[/index2][loop2]|{title}[/loop2]";
- document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0/#version=6,0,0,0/default.htm" width="'+ swf_width +'" height="'+ swf_height +'">');
- document.write('<param name="movie" value="/template/default/portal/style/images/bcastr3.swf"><param name="quality" value="high">');
- document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
- document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">');
- document.write('<embed src="/template/default/portal/style/images/bcastr3.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
- </script></div>
复制代码 页面幻灯处显示有swf,没有其中调用的图。显示如下:
查看页面源代码如下:
- <div class="tm-jdt"><script language='javascript'>
- var swf_width=300;
- var swf_height=250;
- var files = "data/attachment/portal/201202/6333201202011728431.jpg|data/attachment/portal/201202/6332201202011728001.jpg|data/attachment/portal/201202/6331201202011727331.jpg|data/attachment/portal/201202/6330201202011727121.jpg|data/attachment/portal/201202/6329201202011726501.jpg";
- var links = "portal.php?mod=view&aid=4287|portal.php?mod=view&aid=4286|portal.php?mod=view&aid=4285|portal.php?mod=view&aid=4284|portal.php?mod=view&aid=4283";
- var texts = "美海豹陆续出血死亡疑与日本核泄漏有关/图|祖籍台山的19岁美国大兵陈宇晖受虐致死/图|子弹“寄居”脑中82年/图|倭黑猩猩竟生火做饭 向其它猩猩传授技能/图|著名物理学家霍金招聘助理 年薪约2.5万英镑";
- document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0/#version=6,0,0,0/default.htm" width="'+ swf_width +'" height="'+ swf_height +'">');
- document.write('<param name="movie" value="/template/default/portal/style/images/bcastr3.swf"><param name="quality" value="high">');
- document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
- document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">');
- document.write('<embed src="/template/default/portal/style/images/bcastr3.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
- </script></div>
复制代码 由此证明,数据调用无误,为什么就不显示图呢?
|