您现在的位置: 雪儿网络 >> 建站资源 >> 插件下载 >> 动易插件 >> 资源信息

资源名称

超强非FLASH-JS幻灯[图片文章]标签-下载

  •   添加时间: 2007-8-29 23:17:20
  •   下载次数:  月: 周: 日:
  •   文件大小: 12 K
  •   解压密码: www.xueol.com 或 
  • 不会中毒的浏览器免费下载
下载地址1  


如果您发现该资源不能下载,请通知管理员或点击【此处报错】,谢谢!发表评论请点击【参与评论

标签名: {$MY_JS幻灯}

效果图: 



演示地址:http://www.jkrj.cn/JS/text.shtml

SQL查询语句:

select top {input(1)} ArticleID,ChannelID,Title,DefaultPicUrl from PE_Article where ChannelID ={input(0)} and Elite ={$PE_True} and Status =3 and DefaultPicUrl like '%.jpg' order by ArticleID desc

自定义参数:

频道ID 查询数量 图片 图片 标题字数

标签内容:

<!-----------------JS幻灯start------------->
<script language="javascript">
<!--
function p$(string){
document.write(string);
}
function $(id){
return document.getElementById(id);
}
function change_menu(id,content_id,num,total_ztc_menu,menu_on,menu_off){
for (var i=1;i<=total_ztc_menu;i++){
$(id+i).className=menu_off;
$(content_id+i).style.display='none';
}
$(id+num).className=menu_on;
$(content_id+num).style.display='block';
}
//-->
</script>

<style type="text/css">
<!--
#f_div{width:{input(2)}px; height:{input(3)}px; margin:0 auto; overflow:hidden;}
#f_imgDiv{width:100%; height:{input(3)}px; overflow:hidden;}
#f_imgDiv IMG {width:{input(2)}px;height:{input(3)}px;}
#f_img{filter:progid:DXImageTransform.Microsoft.Fade(Overlap=1.00); border:0;}
#f_infoDiv{width:100%;top:-20px !important;top:-22px; position:relative;}
#f_buttonDiv{width:100%; margin-right:1px; height:21px; overflow:hidden; text-align:left;}
#f_line{width:100%;height:1px;background:#fff; overflow:hidden;filter:progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=50, finishY=100,style=1,opacity=0,finishOpacity=100)}
#f_buttonDiv div{width:1px;height:21px; background:#fff; float:right;}
#f_buttonDiv .bg{width:21px; height:21px; background:#fff; float:right; filter:Alpha(Opacity=40);}
#f_buttonDiv a{width:21px;height:21px !important;height:22px;float:right;padding-top:0px;color:#fff;font-family:Arial, Helvetica, sans-serif;font-size:10px;text-align:center;display:block;overflow:hidden;text-decoration:none;position:absolute;}
#f_buttonDiv a:link,#f_buttonDiv a:visited,#f_buttonDiv a:active{color:#000;}
#f_buttonDiv a:hover{background:#FF840C;color:#fff;}
#f_buttonDiv a.on:link,#f_buttonDiv a.on:visited,#f_buttonDiv a.on:active,#f_buttonDiv a.on:hover{background:#FF840C;color:#fff;}
#f_buttonDiv a.on:hover{background:#FF6600;}
#f_text{height:20px; line-height:20px; overflow:hidden;text-align:center;}
#f_text a:link,#f_text a:visited,#f_text a:active{color:#000;text-decoration: none;}
#f_text a:hover{color:#FF6600;text-decoration: none;}
-->
</style>

<div id="f_div">
<!--图片区域-->
<div id="f_imgDiv"></div>
<div id="f_infoDiv">
<!--数字按钮区域-->
<div id="f_buttonDiv"></div>
</div>
</div>
<table width="{input(2)}" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr> 
<td align="center" bgcolor="#EFEFEF">
<!--焦点文字区域-->
<div id="f_text" class="f12b"></div>
<script language='javascript' type='text/javascript'>
<!--
//可修改区域
var _timeOut_=5000;
var show_text = true; //是否显示焦点文字
var timeOut=_timeOut_;
var timeOut2=_timeOut_/2;//onmouseout img后需要切换的时间
var nowpic=0;              //第一张图
var target="_blank";   //打开方式
var button_on ='on'; //当前焦点对应按钮的样式名
var button_off ='';//非当前焦点对应按钮的样式名

//不可修改区域
var imgUrl = new Array();
var imgText = new Array();
var imgLink = new Array();
var imgAlt= new Array();
var menuList = new Array();//菜单menu
var ver=2; //兼容浏览器版本 默认2 为非ie
var firstTime=true;
var n =-1;


{Loop}{Infobegin}//菜单menu
menuList[++n]='XX';
imgUrl[n]='{$InstallDir}{$Field(1,GetChannel,1)}/{$Field(1,GetChannel,3)}/{$Field(3,Text,0,0,0)}';
imgText[n]='<a href="{$InstallDir}{$Field(0,GetUrl,Article,1)}" target="_blank">{$Field(2,Text,{input(4)},0,1)}</a>';
imgLink[n]='{$InstallDir}{$Field(0,GetUrl,Article,1)}';
imgAlt[n]='{$Field(2,Text,{input(4)},0,1)}';{Infoend}{/Loop}

var count=0;
for (var i=0;i<imgUrl.length;i++) {
if( (imgUrl[i]!="") && (imgText[i]!="")&& (imgLink[i]!="")&& (imgAlt[i]!="")) {
count++;
} else {
break;
}
}
//重写css
var each_width=Math.ceil(({input(2)}-(count-1))/count);
var last_width={input(2)}-each_width*(count-1)-(count)+1;

function change(){
if (ver==1){
with($('f_img').filters[0]){
Transition=1;
apply();
play();
}
}
if (firstTime){ firstTime=false;timeOut=_timeOut_/1000;}
else{
 $('f_img').src=imgUrl[nowpic];
 $('f_img').alt=imgAlt[nowpic];
 $('f_imgLink').href=imgLink[nowpic];
 if (show_text) $('f_text').innerHTML=imgText[nowpic];
 for (var i=0;i<count;i++) {
$('b'+i).className="button";
//$('f_menu'+i).className="";
 }
 $('b'+nowpic).className="on";
 //$('f_menu'+nowpic).className="on";
 nowpic=(nowpic>=imgUrl.length-1)?0:nowpic+1;
 timeOut=_timeOut_;
}
theTimer=setTimeout("change()", timeOut);
}
function b_change(num){
window.clearInterval(theTimer);
nowpic=num;
firstTime=false;
change();
}
//draw 渐变line (即css:f_line)
function draw_line(){
var div = document.createElement("div");
div.id = 'f_line';
$('f_infoDiv').insertBefore(div,$('f_infoDiv').childNodes.item(0));
}
//表现层 start
//图片
var a = document.createElement("a");
a.id="f_imgLink";
a.target=target;
a.href=imgLink[nowpic];
$('f_imgDiv').appendChild(a);

var img = document.createElement("img");
img.id="f_img";
img.src=imgUrl[nowpic];
img.alt=imgAlt[nowpic];
a.appendChild(img);

//数字按钮
for (var i=count-1;i>=0;i--){
var div_bg = document.createElement("div");
div_bg.id = 'div_bg'+i;
div_bg.className='bg';
$('f_buttonDiv').appendChild(div_bg);
var a = document.createElement("a");
a.id = 'b'+i;
a.className = (i==nowpic+1)?"button_on":"button_off";
a.title=imgAlt[i];
a.innerHTML=i+1;
a.href='javascript:b_change('+i+')';
$('div_bg'+i).appendChild(a);
var div= document.createElement("div");
$('f_buttonDiv').appendChild(div);
}   
if (show_text) $('f_text').innerHTML = imgText[nowpic];
//表现层 end
$('f_img').onmouseover=function(){window.clearInterval(theTimer);}
$('f_img').onmouseout=function(){theTimer=setTimeout("change()", timeOut2);}
try{  //滤镜版本
  new ActiveXObject("DXImageTransform.Microsoft.Fade");
  $('f_img').filters[0].play(); 
  ver=1;
  draw_line();
  }
catch (e){ver=2;}
var theTimer = setTimeout("change()", _timeOut_/1000);
//-->
</script>
</td>
</tr>
</table><!---------------JS幻灯end------------->

使用方法:

{$MY_JS幻灯(1,4,200,150,32)}:显示频道ID为1的文章频道4个推荐图文,图宽200px,高150px,标题显示32个字符。

雪儿网络
Copyright©2006-2008 Xueol.Com 鄂ICP备06022161号
免责声明:本站共享的软件、源码以及文章等资源均为互联网搜索整理而来,版权归原作者,成员言论属个人立场,与本站无关
返回网站顶部