例:
<script type="text/javascript" src="{JS_PATH}g.base.js"></script>//幻灯片外部js链接
<div id="slide"></div>
<script type="text/javascript">
$("#slide").jdSlide({width:730,height:300,pics:[
//以上为js代码
{pc:content action="lists" catid="49" order="listorder DESC" num="4"}
{loop $data $r}//循环标签
{src:"{$r[thumb]}",href:"{$r[url]}",alt:"",breviary:"#",type:"img"}{if $n!=4},{/if}
//数据读取标签+js代码
{/loop}
{/pc}
//以下为js代码
]})
</script>
phpcms 首页幻灯片调用代码<script type="text/javascript">
{pc:content action="position" posid="1" order="listorder DESC" thumb="1" num="6"}
var swf_width=300
var swf_height=200
var config='3|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'
//-- config 参数设置 -- 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字颜色|当前按键颜色|普通按键色彩 --
var files='{php $num = 1}
{loop $data $n $r}
{$r[thumb]}
{if $num%6!=0}|{/if}
{php $num++}
{/loop}'
var links='{php $num2 = 1}
{loop $data $n $v}
{urlencode($v[url])}
{if $num2%6!=0}|{/if}
{php $num2++}
{/loop}'
var texts='{php $num3 = 1}
{loop $data $n $k}
{$k[title]}
{if $num3%6!=0}|{/if}
{php $num3++}
{/loop}'
{/pc}
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="'+ swf_width +'" height="'+ swf_height +'">')
document.write('<param name="movie" value="{IMG_PATH}focus.swf" />')
document.write('<param name="quality" value="high" />')
document.write('<param name="menu" value="false" />')
document.write('<param name=wmode value="opaque" />')
document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />')
document.write('<embed src="{IMG_PATH}focus.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
document.write('</object>')
</script>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)