dede轮播图

时间:2023-03-08 16:38:16
dede轮播图
DEDEcms 里面有个自带的轮播图调用;

模版 ------> 广告管理  -------->  增加一个新广告   ----进入后的界面

dede轮播图

填写后 点击  代码获取相应的JS调用代码:或者织梦CMS标签调用代码:  都可以

----------------------------------------天王盖地虎---------------------------------------------

上传图片需要  有 “  幻灯   滚动  图片  ”  这三个需要勾选  

文章内容无需在填写;

<table align="center" border="0" cellpadding="0" cellspacing="5" width="100%">  <tbody>
<tr valign="top">
<script type="text/javascript">
pic = new Array();
url = new Array();
title = new Array();
{dede:arclist flag='f' row='5'}
pic[[field:global.autoindex/]]="[field:litpic/]";
url[[field:global.autoindex/]]="[field:arcurl/]";
title[[field:global.autoindex/]]="[field:title/]";
{/dede:arclist}
var i=1
for (i=1;i<=pic.length-1;i++)
{
document.write("<td align=center><a title="+title[i]+" href="+url[i]+" target='_blank'><img class='pic' src="+pic[i]+" border=0 height=105 width=150></a></td>" );
}
</script> </tr>
</tbody> </table>
 
----------------------------------------------------------------------------------------------
 
 
<script type="text/javascript">
 
方法一:
/**
pic = new Array();
url = new Array();
title = new Array();
{dede:arclist flag='f' row='5'}
pic[[field:global.autoindex/]]="[field:litpic/]";
url[[field:global.autoindex/]]="[field:arcurl/]";
title[[field:global.autoindex/]]="[field:title/]";
{/dede:arclist}
var i=1;
var html='';
for (i=1;i<=pic.length-1;i++)
{ html+='<li><div class="img"><img src='+pic[i]+' height="450" width"960" alt="" /></div></li>' }
$('#cc').append(html)
*/
 
 
方法二:
pic = new Array();
url = new Array();
title = new Array();
{dede:arclist flag='f' row='5'}
pic[[field:global.autoindex/]]="[field:litpic/]";
url[[field:global.autoindex/]]="[field:arcurl/]";
title[[field:global.autoindex/]]="[field:title/]";
{/dede:arclist}
var i=1;
var Occ = document.getElementById('cc');
var html='';
for (i=1;i<=pic.length-1;i++)
{ html +='<li><div class="img"><img src='+pic[i]+' height="450" width"960" alt="" /></div></li>'; }
$('#cc').html(html)
</script>
 
轮播图的顺序:
 
TAG标签哪行最后用一个权重(数字越大越靠前) ;

dede轮播图