62,046
社区成员
发帖
与我相关
我的任务
分享
function changeimg(n){nn=n;window.clearInterval(tt);change_img();}
function changeimg(n){
nn=n;
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
window.clearInterval(tt);
change_img();
}
<SCRIPT>
//Alpha:设置透明度
//Alpha(Opacity=?, FinishOpacity=?, Style=?, StartX=?, StartY=?, FinishX=?, FinishY=?)
//Opacity:透明度级别,范围是0-100,0代表完全透明,100代表完全不透明。
//FinishOpacity:设置渐变的透明效果时,用来指定结束时的透明度,范围也是0 到 100。
//Style:设置渐变透明的样式,值为0代表统一形状、1代表线形、2代表放射状、3代表长方形。
//StartX和StartY:代表渐变透明效果的开始X和Y坐标。
//FinishX和FinishY:代表渐变透明效果结束X和Y 的坐标。
var widths=340;
var heights=380;
var counts=12;
img1=new Image ();img1.src='http://www.hxxjhouse.com/2008/img/CYP512a.jpg';
img2=new Image ();img2.src='http://www.hxxjhouse.com/2008/img/CYP512b.jpg';
img3=new Image ();img3.src='http://www.hxxjhouse.com/2008/img/CYP512c.jpg';
img4=new Image ();img4.src='http://www.hxxjhouse.com/2008/img/CYP512d.jpg';
img5=new Image ();img5.src='http://www.hxxjhouse.com/2008/img/CYP512e.jpg';
img6=new Image ();img6.src='http://www.hxxjhouse.com/2008/img/CYP512f.jpg';
img7=new Image ();img7.src='http://www.hxxjhouse.com/2008/img/CYP512g.jpg';
img8=new Image ();img8.src='http://www.hxxjhouse.com/2008/img/CYP512h.jpg';
img9=new Image ();img9.src='http://www.hxxjhouse.com/2008/img/CYP512i.jpg';
img10=new Image ();img10.src='http://www.hxxjhouse.com/2008/img/CYP512j.jpg';
img11=new Image ();img11.src='http://www.hxxjhouse.com/2008/img/CYP512k.jpg';
img12=new Image ();img12.src='http://www.hxxjhouse.com/2008/img/CYP512l.jpg';
url1=new Image ();url1.src='http://www.hxxjhouse.com/2008/img/CYP512a.jpg';
url2=new Image ();url2.src='http://www.hxxjhouse.com/2008/img/CYP512b.jpg';
url3=new Image ();url3.src='http://www.hxxjhouse.com/2008/img/CYP512c.jpg';
url4=new Image ();url4.src='http://www.hxxjhouse.com/2008/img/CYP512d.jpg';
url5=new Image ();url5.src='http://www.hxxjhouse.com/2008/img/CYP512e.jpg';
url6=new Image ();url6.src='http://www.hxxjhouse.com/2008/img/CYP512f.jpg';
url7=new Image ();url1.src='http://www.hxxjhouse.com/2008/img/CYP512g.jpg';
url8=new Image ();url2.src='http://www.hxxjhouse.com/2008/img/CYP512h.jpg';
url9=new Image ();url3.src='http://www.hxxjhouse.com/2008/img/CYP512i.jpg';
url10=new Image ();url4.src='http://www.hxxjhouse.com/2008/img/CYP512j.jpg';
url11=new Image ();url5.src='http://www.hxxjhouse.com/2008/img/CYP512k.jpg';
url12=new Image ();url6.src='http://www.hxxjhouse.com/2008/img/CYP512l.jpg';
//天极
var nn=1;
var key=0;
function change_img()
{if(key==0){key=1;}
else if(document.all)
//下面去掉一个后只有切换效果,没有滤镜效果
{
document.getElementById("pic").filters.revealTrans.Transition=23;
document.getElementById("pic").filters.revealTrans.apply();
document.getElementById("pic").filters.revealTrans.play();
//document.getElementById("pic").filters[0].Apply();
//document.getElementById("pic").filters[0].Play(duration=2);
}
//{document.getElementById("pic").filters[0].Play(duration=2);}
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
for (var i=1;i <=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
document.getElementById("xxjdjj"+nn).className='bxx';
nn++;if(nn> counts){nn=1;}
tt=setTimeout('change_img()',3000);}
function changeimg(n){nn=n;window.clearInterval(tt);
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
for (var i=1;i <=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
document.getElementById("xxjdjj"+nn).className='bxx';
nn++;if(nn> counts){nn=1;}
tt=setTimeout('change_img()',3000);
//change_img();
}
document.write(' <style> ');
document.write('.axx{padding:1px 7px;border-left:#cccccc 1px solid;}');
document.write('a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:18px;font:9px sans-serif;background-color:#666;}');
document.write('a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:18px;font:9px sans-serif;background-color:#999;}');
document.write('.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}');
document.write('a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:18px;font:9px sans-serif;background-color:#D34600;}');
document.write('a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:18px;font:9px sans-serif;background-color:#D34600;}');
document.write(' </style> ');
document.write(' <div style="width:'+widths+'px;height:'+heights+'px;overflow:hidden;text-overflow:clip;"> ');
document.write(' <div> <span id="url"> <img id="pic" name="pic" style="FILTER: revealTrans(duration=1,transition=5);" width='+widths+' height='+heights+' /> </span> </div> ');
document.write(' <div style="filter:alpha(style=0,opacity=100,finishOpacity=80);background: #888888;width:100%-2px;text-align:right;top:-14px;position:relative;margin:1px;height:18px;padding:0px;margin:0px;border:0px;"> ');
for(var i=1;i <counts+1;i++){document.write(' <a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self"> '+i+' </a> ');}
document.write(' </div> </div> ');
change_img();
</SCRIPT>