首页 JS+图片 方式 实现幻灯翻转新闻 ???
首页 JS+图片 方式 实现幻灯翻转新闻 ???
有没有这样的JS 代码,或实现方式??
网上一般都是Flash 幻灯新闻,我现在想要一个JS + 图片方式的
------解决方案--------------------这是我的程序,你看一下吧
<SCRIPT language=JavaScript>
var imgUrl=new Array();
var imgLink=new Array();
<%
strsql4 = "select top 6 * from Product order by id desc "
set rs4 = conn.execute(strsql4)
n=1
do while not rs4.eof
%>
imgUrl[ <%=n%> ]= " <%=rs4( "DefaultPicUrl ")%> ";
imgLink[ <%=n%> ]= "# ";
<%
rs4.movenext
n=n+1
loop
%>
var adNum=0;
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();
}
var key=0;
function nextAd(){
adNum=adNum%6;
adNum++ ;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=23;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
theTimer=setTimeout( "nextAd() ", 4000);
}
function goUrl(){
jumpUrl=imgLink[adNum];
jumpTarget= '_blank ';
if (jumpUrl != ' '){
if (jumpTarget != ' ')
window.open(jumpUrl,jumpTarget);
else
location.href=jumpUrl;
}
}
</script>
<a href= "javascript:goUrl() "> <img style= "FILTER: revealTrans(duration=2,transition=10);border-color:black;color:#000000 " src= "javascript:nextAd() " width=188 height=120 border=0 class=img1111 name=imgInit> </a>