新微赢技术网
标题:
数据组的问题
[打印本页]
作者:
想念~!
时间:
2010-1-16 03:35
标题:
数据组的问题
<!--广告图片开始-->
<script type="text/javascript">
<!--
var focus_width=390
var focus_height=225
var text_height=0
var swf_height = focus_height+text_height
var pics='images/top/001.jpg|images/top/002.jpg|images/top/003.jpg|images/top/004.jpg'
var links='http://localhost:1030/newshtml/jmc/20061110114911|http://localhost:1030/newshtml/mainnews/20061110112702|http://localhost:1030/newshtml/mainnews/20061111011707|http://localhost:1030/newshtml/ystc/20061110114033'
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://edu.qq.com/flash/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="http://edu.qq.com/flash/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="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
//-->
</script>
<!--广告图结束-->
以上代码是实现广告的JS,如果 pics,links的值是从数据中取得,请问是否用数据组的方式?具体怎么实现?
作者:
︶ㄣlоve_
时间:
2010-1-16 03:35
先用ASP取出pics和link的数据库里的数据比如
DIM pics,link
'用循环取出数据库里的数据
之后,用asp生成js语句就可以了,如同
<script>
var pics='<%=pics%>';
var links='<%=links%>';
</script>
作者:
寂寞男孩
时间:
2010-1-16 03:36
多谢版主.
欢迎光临 新微赢技术网 (http://bbs.weiying.cn/)
Powered by Discuz! X3.2