在DEDECMS 3.1lit里实现幻灯片效果(区别于官方,增添了选择按钮)(2)_DedeCms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

<td width="346" valign="top" style="border:#B2B2B2 1px solid; border-left:0;

background:#DEDEDE;">
<div style="border:1px #fff solid; border-top:0; padding-bottom:3px;">
<table width="325" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td style="background:url([img]http://www.pclady.com.cn/images/06/06index2__21.gif[/img])

right repeat-y;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="23"><div id="f_text"></div><div id="f_button_num">
<script>
var imgWidth=325; //图片宽
var imgHeight=240; //图片高
var TimeOut=5000; //每张图切换时间 (单位毫秒);
var imgAlt=new Array();
var imgUrl=new Array();
var imgLink=new Array();
var imgtext=new Array();
var button_off='f_button_off'; //className
var button_on='f_button_on'; //className
var imgStyle=''; //图片style (注: 不是class)
var focustextStyle='height:25px; line-height:25px; text-align:center;'; //焦点文字

style (注: 不是class)
var textClass='';


{dede:arclist row=4 titlelen=38 orderby=pubdate typeid=9 type='image'}
imgUrl[[field:global name=autoindex/]] = "[field:picname/]";
imgLink[[field:global name=autoindex/]] = "[field:arcurl/]";
imgAlt[[field:global name=autoindex/]]='[field:title/]';
imgtext[[field:global name=autoindex/]] = "[field:title/]";
{/dede:arclist}


var count=0;
for (i=1;i<=imgUrl.length;i ) {
if( (imgUrl[i]!="") && (imgLink[i]!="")&&(imgAlt[i]!="")&&(imgUrl[i]!=null) && (imgLink

[i]!=null)&&(imgAlt[i]!=null) )
{count ;} else {break;}
}
function change(i){
window.clearInterval(theTimer);
switch(browser){
//ie6 以上版本
case 1 :
adNum = i; nextAd_1();
break;
//其他浏览器
case 2 :
adNum = i-1; nextAd_2();
break;
}

}
/* nextAd_1 */
function nextAd_1() {
if(bStart == 0)
{
bStart = 1;
theTimer=setTimeout('nextAd_1()', TimeOut);
return;
}
else
{
oTransContainer.filters[0].Apply();
for (var i=1;i<=count;i ){
//document.getElementById('focus_summary' i).style.display="none";
document.getElementById('b' i).className = button_off;
document.images['oDIV' i].style.display = "none";
}
//document.getElementById('focus_summary' adNum).style.display="block";
document.getElementById('b' adNum).className = button_on;

查看更多 DedeCms教程  织梦模板  织梦DedeCms视频教程  织梦dedecms专题

来源:模板无忧//所属分类:DedeCms教程/更新时间:2007-01-28
相关DedeCms教程