网页设计网站首页导航相册
- 提问者网友:疯子也有疯子的情调
- 2021-04-24 07:30
- 五星知识达人网友:青尢
- 2021-04-24 08:51
<script>
//-----WNum 为图片宽度
//-----HNum 为图片高度
//-----TNum 为文字高度(可为空 ,即不显示)
function go_Img(WNum,HNum,TNum){
Go_Num=(imgUrl.length-1);key=0;adNum=0;theTimer='';
var C_lass;
var $=function $(str){return document.write(str);};
var C_ss="<style>";
C_ss=C_ss+"div{overflow:hidden;}";
C_ss=C_ss+".W_Ord{overflow;hidden;text-align:center;color:#F00;font-weight:bold;clear:both;width:"+WNum+"px;height:"+TNum+";background-color:#eee;}";
C_ss=C_ss+".Min_On{color:#fff;Float:right;background-color:#f00;cursor:pointer;width:30px;height:20px;padding-top:1px;border:1px solid #f60;text-align:center;font-weight:bold;border-left:1px solid #eee;border-right:1px solid #eee;margin-left:-1px;}";
C_ss=C_ss+".Min_Off{color:#fff;Float:right;cursor:pointer;width:30px;height:20px;padding-top:1px;border-left:1px solid #eee;border-right:1px solid #eee;margin-left:-1px;text-align:center;font-weight:bold;}";
C_ss=C_ss+"</style>";
$(C_ss);C_ss='';
$("<Div style='width:"+WNum+"px;height:"+HNum+"px;border:1px solid #eee;'>");
$("<div style='width:"+WNum+"px;height:"+HNum+"px;'><img style='Cursor:Pointer;Filter:revealTrans(duration=2,transition=12);width:"+WNum+"px;height:"+HNum+"px;' src='"+imgUrl[1]+"' name=imgInit onclick=go_Url();></Div>");
$("<div class='Rig' style='width:"+WNum+"px;height:20px;margin-top:-20px;'>");
for (var i=100;i>0 ;i=i-2){
$("<Div style='float:right;width:4px;height:20px;background-color:#000;filter:alpha(opacity="+i/2+");-moz-opacity:0."+i/20+";opacity: 0."+i/20+"; '> </Div>");
}
$("</Div>");
$("<Div class='Rig' style='width:"+WNum+"px;height:"+HNum+"px;margin-top:-20px;'>");
for (var j=Go_Num;j>0 ;j--){
if (j==1){C_lass='Min_On';}else{C_lass='Min_Off';}
$("<Div Id='Min"+j+"' class='"+C_lass+"' onmouseover=nextAd("+j+");>"+j+"</Div>");
}
$("</Div>");
$("</Div>");
if (TNum && TNum!=''){
$("<Div Id='W_Ord' class='W_Ord'>"+imgWord[1]+"</Div>");
}
nextAd(1);
}
function nextAd(GetNum){
var O=function O(objid){return document.getElementById(objid);}
adNum=adNum%Go_Num;
adNum++ ;
if(GetNum!=undefined && GetNum!=0){adNum=GetNum;}
if(key==0){key=1;}
else if(document.all){
imgInit.filters.revealTrans.Transition=23;
imgInit.filters.revealTrans.apply();
imgInit.filters.revealTrans.play();
if (document.all.W_Ord!=undefined){document.all.W_Ord.innerHTML=imgWord[adNum];}
for (var i=1;i<(Go_Num+1);i++ ){O('Min'+i).className='Min_Off';}
O('Min'+adNum).className='Min_On';
}
document.images.imgInit.src=imgUrl[adNum];
if (GetNum==undefined){theTimer=setTimeout(nextAd, 6000);}
else{clearTimeout(theTimer);theTimer=setTimeout(nextAd, 6000);}
}
function go_Url(jumpTarget){
jumpUrl=imgLink[adNum];
jumpTarget='_blank'; //_blank
if (jumpUrl != ''){
if (jumpTarget != '')
window.open(jumpUrl,jumpTarget);
else
location.href=jumpUrl;
}
}
</script>
<script>
//-------建产数组
var imgUrl=new Array();
var imgLink=new Array();
var imgWord=new Array();
imgUrl[1]=' http://hfxhyy.35hf.cn/back/UpPic/8vzrlf5v1czut.jpg';
imgLink[1]=' http://hfxhyy.35hf.cn/Object.asp?StrId=20';
imgWord[1]='Six信息';
imgUrl[2]=' http://hfxhyy.35hf.cn/back/UpPic/q6hxyzon6by4b.jpg';
imgLink[2]=' http://hfxhyy.35hf.cn/Object.asp?StrId=18';
imgWord[2]='Five';
imgUrl[3]=' http://hfxhyy.35hf.cn/back/UpPic/kdiqte-0rune7.jpg';
imgLink[3]='/Object.asp?StrId=17';
imgWord[3]='Four';
imgUrl[4]=' http://hfxhyy.35hf.cn/back/UpPic/mrocr4k8v1f40.jpg';
imgLink[4]=' http://hfxhyy.35hf.cn/Object.asp?StrId=16';
imgWord[4]='Three';
imgUrl[5]=' http://hfxhyy.35hf.cn/back/UpPic/rsba4jy1m7mf6.jpg';
imgLink[5]=' http://hfxhyy.35hf.cn/Object.asp?StrId=15';
imgWord[5]='Two';
imgUrl[6]=' http://hfxhyy.35hf.cn/back/UpPic/ttqnfeij7_d8p.jpg';
imgLink[6]=' http://hfxhyy.35hf.cn/Object.asp?StrId=14';
imgWord[6]='one';
// 调用方法
go_Img(290,205,20); //-----------------------------调用方法
</script>
放在html里运行一下看看
- 1楼网友:痴妹与他
- 2021-04-24 11:52
- 2楼网友:酒安江南
- 2021-04-24 11:38
<body> <table align=center width="237"> <TR> <TD> <table width=100%> <tr> <td colspan=6> <font size=2><div id="b2bContent" style="FILTER: revealTrans(Duration=1,Transition=23); WIDTH: 100%; HEIGHT: 162px"></div></font> </td> </tr> <tr> <td align=center STYLE='cursor:hand'><font size=2><div class="b2bbutton" id="bt0" onclick="javascript:showPage(0);clearTimeout(theTimer);theTimer=setTimeout('turnPage()',speed);checkBt();">1</div></font></td> <td align=center STYLE='cursor:hand'><font size=2><div class="b2bbutton" id="bt1" onclick="javascript:showPage(1);clearTimeout(theTimer);theTimer=setTimeout('turnPage()',speed);checkBt();">2</div></font></td> <td align=center STYLE='cursor:hand'><font size=2><div class="b2bbutton" id="bt2" onclick="javascript:showPage(2);clearTimeout(theTimer);theTimer=setTimeout('turnPage()',speed);checkBt();">3</div></font></td> <td align=center STYLE='cursor:hand'><font size=2><div class="b2bbutton" id="bt3" onclick="javascript:showPage(3);clearTimeout(theTimer);theTimer=setTimeout('turnPage()',speed);checkBt();">4</div></font></td> <td align=center STYLE='cursor:hand'><font size=2><div class="b2bbutton" id="bt4" onclick="javascript:showPage(4);clearTimeout(theTimer);theTimer=setTimeout('turnPage()',speed);checkBt();">5</div></font></td> <td align=center STYLE='cursor:hand'><font size=2><div class="b2bbutton" id="bt5" onclick="javascript:showPage(5);clearTimeout(theTimer);theTimer=setTimeout('turnPage()',speed);checkBt();">6</div></font></td> </tr> </table> <script language="javascript"> <!-- b2bStr = new Array(); b2bStr[0]= "<div style='float:left; width:100%;overflow:hidden;'><a href=1.gif target=_blank><img src=1.gif width=214px height=145px border=0></a><br><a target=_blank title=太阳岛公园一角 href=1.gif>太阳岛公园一角</a></div>"; b2bStr[1] = "<div style='float:left; width:100%;overflow:hidden;'><a href=2.gif target=_blank><img src=2.gif width=214px height=145px border=0></a><br><a target=_blank title=太阳岛公园湖光山色 href=2.gif>太阳岛公园湖光山色</a></div>"; b2bStr[2] = "<div style='float:left; width:100%;overflow:hidden;'><a href=3.gif target=_blank><img src=3.gif width=214px height=145px border=0></a><br><a target=_blank title=哈尔滨雪雕 href=3.gif>哈尔滨雪雕</a></div>"; b2bStr[3] = "<div style='float:left; width:100%;overflow:hidden;'><a href=4.gif target=_blank><img src=4.gif width=214px height=145px border=0></a><br><a target=_blank title=镜泊湖 href=4.gif>镜泊湖</a></div>"; b2bStr[4] = "<div style='float:left; width:100%;overflow:hidden;'><a href=5.gif target=_blank><img src=5.gif width=214px height=145px border=0></a><br><a target=_blank title=太阳岛公园瀑布 href=5.gif>太阳岛公园瀑布</a></div>"; b2bStr[5] = "<div style='float:left; width:100%;overflow:hidden;'><a href=6.gif target=_blank><img src=6.gif width=214px height=145px border=0></a><br><a target=_blank title=镜泊湖夜色 href=6.gif>镜泊湖夜色</a></div>";
var page=0; var speed=3000; function showPage(id){ page=id; setTransition(); b2bContent.innerHTML=b2bStr[id]; b2bContent.filters.revealTrans.play(); } function turnPage(){ showPage(page); theTimer=setTimeout("turnPage()", speed); checkBt(); page++; if(page>=6) page=0; } function checkBt(){ for(var i=0;i<6;i++){ btObj=eval('bt'+i); if(page==i){btObj.style.color='#FFFFFF';btObj.style.backgroundColor='#FF781C';} else{btObj.style.color='#000000';btObj.style.backgroundColor='#F7F7F7';} } } function setTransition(){ b2bContent.filters.revealTrans.Transition=Math.round(Math.random()*23); b2bContent.filters.revealTrans.apply(); } turnPage(); //--> </script> </TD> </TR> </table> </body>
这个是JS的
- 3楼网友:第幾種人
- 2021-04-24 10:46
这个一般都是flash
里面镶加图片和链接
- 4楼网友:神鬼未生
- 2021-04-24 10:20
有JS做的。也有FLASH做的。区别方法就是右键单击它,看出来的菜单是什么