用sql标签可以
<script language="javascript" type="text/javascript" src="/include/flashobj.js"></script>
<div id=sasFlashFocus27>
<SCRIPT>
var sohuFlash2 = new sohuFlash("/templets/images/foucs/demo001.swf", "27", 502, 245, "7");
sohuFlash2.addParam("quality", "high");
sohuFlash2.addParam("wmode", "opaque");
sohuFlash2.addVariable("image","/templets/images/foucs/01.jpg|/templets/images/foucs/02.jpg|/templets/images/foucs/03.jpg|/templets/images/foucs/04.jpg|");
sohuFlash2.addVariable("url","/html/tushuxinxi/qikan/zhuantijiaoyu/2009/0302/855.html|/plus/list.php?tid=149|/html/tushuxinxi/jichujiaoyu/gaozhongyueduyuzuowen/2009/0217/691.html|/html/tushuxinxi/jichujiaoyu/gaokaoyongshu/2009/0225/836.html|");
sohuFlash2.addVariable("info", "专题教育:创新家教系列丛书隆重上市|文化作文丛书——作文高分的捷径|作文经典素材——发行量突破40万册|名校联合推荐:重庆09中/高考权威预测卷|");
sohuFlash2.addVariable("stopTime","5000");
sohuFlash2.write("sasFlashFocus27");
</SCRIPT>
</div>
原理如下:
红色的部分定义三个js变量替代,然后循环输出给这三个变量赋值.
用sql标签的IF语句,判断如果第一次就是var pics='字段标签';第二次就是pics+='|'+'字段标签'