| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1050 人关注过本帖
标题:为什么滤镜的效果作用不到图片上
只看楼主 加入收藏
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
结帖率:100%
收藏
 问题点数:0 回复次数:0 
为什么滤镜的效果作用不到图片上
程序代码:
<div align="center"><div id=AdRotator></div><!--<input id="second"><button onClick="adRotator.set(getRef('second').value)">set time</button>--></div>
<SCRIPT type="text/javascript">
<!--
function adRotator() {};
adRotator.initialize=function(o)
{
// script by blueDestiny
this._t = new Array();
this._l = new Array();
this._p = new Array();
this._i = new Image();
this._c = 0;
this._f = false;
this._o = o;
this._timeout = null;
this._html = "";
// configration.
// @ image width
// @ image height
// @ rotator speed
// @ filter type
this._w = 358;
this._h = 208;
this._s = 4;
this._x = 23;
return this;
};
adRotator.add=function(p,t,l) { with (this)
{
_p.push(p);
_t.push(t);
_l.push(l);
}};
adRotator.load=function() { with (adRotator)
{
if( _i.readyState=='complete' )
{
if(_p.length-1==_c)
{
_f = true;
_c = 0;
window.clearTimeout(_timeout);
//getRef("AdRotator").innerHTML="complete";
adRotator.play();
}
else
{
_c++;
getRef(_o).innerHTML="total images " + _p.length + ", loading picture " + _c + ' ' + _i.readyState + "...";
_timeout=window.setTimeout(adRotator.load,4)
}
}
else
{
getRef(_o).innerHTML="total images " + _p.length + ", loading picture " + _c + ' ' + _i.readyState + "...";
_timeout=window.setTimeout(adRotator.load,4)
}
}};
adRotator.play=function() { with (adRotator)
{
if( _f )
{
_html = "";
_html += '<table style="border:1px solid #333333;"><tr><td style="font-size:9pt;font-family:tahoma;font-weight:bold;">'
_html += '<div id="rotatorPlayer"'
+ ' style="width:' + _w + ''
+ ';height:"' + _h + '"'
+ '>'
_html += '<a href="' + ( _l[_c] ? _l[_c] : "javascript:void(0);" ) + '">';
_html += '<img id="rotatorPic" src="' + _p[_c] + '"'
+ ' width="' + _w + '"'
+ ' height="' + _h + '"'
+ (_t[_c]?' title="' + _t[_c] + '"':'')
+ ' style="border:1px solid blue;filter:revealTrans(transition=' + _x + ',duration=1);"'
+ ' >';
_html += (_t[_c]?('<div align="center">' + (_c+1) + '. ' + _t[_c] + '</div>'):'<p></p>');
_html += '</a>';
_html += "</div>";
_html += '<div align="right">';
for(var i=0; i<_p.length; i++)
_html += '<span'
+ ' style="border:1px solid #333333;padding:1px 5px 1px 5px;height:20px;text-align:center;cursor:'
+ (_c==i ? ('default;background-color:red;"') : 'hand;" onclick="adRotator.select(' + i + ')"')
+ '>'
+ (i>8?(i+1):('0'+(i+1)))+ '</span> ';
_html += "</div></td></tr></table>";
//alert(_html);
getRef(_o).innerHTML = _html;
getRef("rotatorPic").filters[0].Apply();
getRef("rotatorPic").filters[0].Play();
next();
}
else
{
_i.src = _p[_c];
adRotator.load();
}
}};
adRotator.next=function() { with (this)
{
(_p.length-1==_c) ? _c=0 : _c++;
_timeout=window.setTimeout(adRotator.play,_s*1000);
}};
adRotator.select=function(i) { with (this)
{
window.clearTimeout(_timeout);
_c=i;
adRotator.play();
}};
adRotator.set=function(second) { with (this)
{
window.clearTimeout(_timeout);
if((/\d+/).test(second)==true)
{
_s=second;
adRotator.play();
}
else
{
alert("must be digit!")
adRotator.play();
}
}};
function getRef(id)
{
return (document.all?document.all(id):document.getElementById(id));
}
adRotator.initialize("AdRotator");
var inc;
var upload;
var img;
var title;
var adv_url
<%
do while not rsadv.eof
title =rsadv("adv_title")
adv_url =rsadv("adv_url")
img=rsadv("src")
               if instr(img, "[uploadimg]") then
             img = Replace(img, "[uploadimg]", "inc/upload/")
        img = Replace(img, "[/uploadimg]", "")            
          end if
%>
var img1;
img1=new Image ();
img1.src='<%=img%>';
var title1;
title1='<%=title%>'
var adv_url1;
adv_url1='<%=adv_url%>'
adRotator.add(img1.src,title1,adv_url1)

<%
rsadv.movenext
loop
rsadv.close
%>
adRotator.play();
//-->
</SCRIPT>

为什么只有刷新时style="border:1px solid blue;filter:revealTrans(transition=' + _x + ',duration=1);才有效果,切换图片时没有效果呢

[[it] 本帖最后由 madpbpl 于 2008-6-25 16:12 编辑 [/it]]
搜索更多相关主题的帖子: 滤镜 效果 
2008-06-25 16:07
快速回复:为什么滤镜的效果作用不到图片上
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016187 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved