效果:http://ttt.sdo.com/web1.0/banner.htm 备份: HTML: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Untitled Document</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style></head> <body topmargin="3"> <table width="500" height="3" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="images/ad/blank.gif" width="1" height="1"></td> </tr> </table> <!--rotate 硅呈 抛捞喉 矫累--> <script> var fadeimages = new Array; var linkarr = new Array; var numimg = new Array; fadeimages[0] = 'images/ad/ad060418.jpg'; linkarr[0] = 'http://ttt.sdo.com/web1.0/News.asp?a=1&CategoryID=1&ID=136'; numimg[0] = 'images/01_02.gif'; fadeimages[1] = 'images/ad/ad05.gif'; linkarr[1] = 'http://ttt.sdo.com/project/test/event4.asp'; numimg[1] = 'images/02_02.gif'; fadeimages[2] = 'images/ad/ad01.gif'; linkarr[2] = 'http://ttt.sdo.com/project/media/'; numimg[2] = 'images/03_02.gif'; fadeimages[3] = 'images/ad/ad02.gif'; linkarr[3] = 'http://ttt.sdo.com'; numimg[3] = 'images/04_02.gif'; fadeimages[4] = 'images/ad/ad03.gif'; linkarr[4] = 'http://ttt.sdo.com'; numimg[4] = 'images/05_02.gif'; fadeimages[5] = 'images/ad/ad04.gif'; linkarr[5] = 'http://ttt.sdo.com'; numimg[5] = 'images/06_02.gif'; var cliImg = ''; var cliImgSrc = ''; var n = Math.round(Math.random() * 10); var interval = 7000; var setTimeId = ''; function rotateStop() { clearTimeout(setTimeId); } function rotateStart() { rotate(); } function chki(ci, no) { var pImg = document.all.RollImg; var pUrl = document.all.RollUrl; if(cliImg == '') { cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[no]; n=no; pImg.src = fadeimages[no]; pUrl.href = linkarr[no]; } else if(cliImg != ci) { cliImg.src = cliImgSrc; cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[no]; n=no; pImg.src = fadeimages[no]; pUrl.href = linkarr[no]; } } function rotate() { n = (n >= 3) ? 0 : n+1; setimgurl(); setTimeId=setTimeout("rotate()",interval); } function setimgurl() { var ci = eval('document.all.num_img'+n); document.all.RollImg.filters.blendTrans.apply(); document.all.RollUrl.href=linkarr[n]; document.all.RollImg.src=fadeimages[n]; document.all.RollImg.filters.blendTrans.play(); if(cliImg == '') { cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[n]; } else if(cliImg != ci) { cliImg.src = cliImgSrc; cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[n]; } } //--> </script> <table width="500" height="170" border="0" cellpadding="0" cellspacing="0"> <tr> <td><a href="http://ttt.sdo.com/web1.0/News.asp?a=1&CategoryID=1&ID=136" name="RollUrl" target="_blank" onFocus="this.blur()" ><img src="images/ad/ad060418.jpg" border="0" name="RollImg" style="filter:blendTrans(duration=2);"width="500" height="140"></a></td> </tr> <tr> <td height="33" align="right" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/ttt.gif" width="202" height="26"></td> <td align="right"><Table border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="bottom" style="padding-bottom:2px;"> </td> <td style="padding-bottom:2px;"><img src="images/01_01.gif" name="num_img0" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 0);"></td> <td style="padding-bottom:2px;"><img src="images/02_01.gif" name="num_img1" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 1);"></td> <td style="padding-bottom:2px;"><img src="images/03_01.gif" name="num_img2" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 2);"></td> <td style="padding-bottom:2px;"><img src="images/04_01.gif" name="num_img3" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 3);"></td> <td style="padding-bottom:2px;"><img src="images/05_01.gif" name="num_img4" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 4);"></td> <td style="padding-bottom:2px;"><img src="images/06_01.gif" name="num_img5" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 5);"></td> </tr> </TABLE></td> </tr> </table> </td> </tr> </table> <SCRIPT LANGUAGE="JavaScript"> <!-- rotateStart(); //--> </SCRIPT> </body> </html>
改造过的,没有滤镜转换效果,但是在 FF 下面可以自动切换图片了。 HTML: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Untitled Document</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style></head> <body topmargin="3"> <table width="500" height="3" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="images/ad/blank.gif" width="1" height="1"></td> </tr> </table> <!-- rotate --> <script> var fadeimages = new Array; var linkarr = new Array; var numimg = new Array; fadeimages[0] = 'http://ttt.sdo.com/web1.0/images/ad/ad060418.jpg'; linkarr[0] = 'http://ttt.sdo.com/web1.0/News.asp?a=1&CategoryID=1&ID=136'; numimg[0] = 'http://ttt.sdo.com/web1.0/images/01_02.gif'; fadeimages[1] = 'http://ttt.sdo.com/web1.0/images/ad/ad05.gif'; linkarr[1] = 'http://ttt.sdo.com/project/test/event4.asp'; numimg[1] = 'http://ttt.sdo.com/web1.0/images/02_02.gif'; fadeimages[2] = 'http://ttt.sdo.com/web1.0/images/ad/ad01.gif'; linkarr[2] = 'http://ttt.sdo.com/project/media/'; numimg[2] = 'http://ttt.sdo.com/web1.0/images/03_02.gif'; fadeimages[3] = 'http://ttt.sdo.com/web1.0/images/ad/ad02.gif'; linkarr[3] = 'http://ttt.sdo.com'; numimg[3] = 'http://ttt.sdo.com/web1.0/images/04_02.gif'; fadeimages[4] = 'http://ttt.sdo.com/web1.0/images/ad/ad03.gif'; linkarr[4] = 'http://ttt.sdo.com'; numimg[4] = 'http://ttt.sdo.com/web1.0/images/05_02.gif'; fadeimages[5] = 'http://ttt.sdo.com/web1.0/images/ad/ad04.gif'; linkarr[5] = 'http://ttt.sdo.com'; numimg[5] = 'http://ttt.sdo.com/web1.0/images/06_02.gif'; var cliImg = ''; var cliImgSrc = ''; var n = Math.round(Math.random() * 10); var interval = 7000; var setTimeId = ''; function rotateStop() { clearTimeout(setTimeId); } function rotateStart() { rotate(); } function chki(ci, no) { var pImg = document.all.RollImg; var pUrl = document.all.RollUrl; if(cliImg == '') { cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[no]; n=no; pImg.src = fadeimages[no]; pUrl.href = linkarr[no]; } else if(cliImg != ci) { cliImg.src = cliImgSrc; cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[no]; n=no; pImg.src = fadeimages[no]; pUrl.href = linkarr[no]; } } function rotate() { n = (n >= 3) ? 0 : n+1; setimgurl(); setTimeId=setTimeout("rotate()",interval); } function setimgurl() { var ci = eval('document.all.num_img'+n); if (document.all) { document.all.RollImg.filters.blendTrans.apply(); document.all.RollUrl.href=linkarr[n]; document.all.RollImg.src=fadeimages[n]; document.all.RollImg.filters.blendTrans.play(); } else { //document.getElementById("RollImg").filters.blendTrans.apply(); document.getElementById("RollUrl").href=linkarr[n]; document.getElementById("RollImg").src=fadeimages[n]; //document.getElementById("RollImg").filters.blendTrans.play(); } if(cliImg == '') { cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[n]; } else if(cliImg != ci) { cliImg.src = cliImgSrc; cliImg = ci; cliImgSrc = ci.src; ci.src = numimg[n]; } } //--> </script> <table width="500" height="170" border="0" cellpadding="0" cellspacing="0"> <tr> <td><a href="http://ttt.sdo.com/web1.0/News.asp?a=1&CategoryID=1&ID=136" name="RollUrl" id="RollUrl" target="_blank" onFocus="this.blur()" ><img src="images/ad/ad060418.jpg" border="0" name="RollImg" id="RollImg" style="filter:blendTrans(duration=2);"width="500" height="140"></a></td> </tr> <tr> <td height="33" align="right" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="http://ttt.sdo.com/web1.0/images/ttt.gif" width="202" height="26"></td> <td align="right"><Table border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="bottom" style="padding-bottom:2px;"> </td> <td style="padding-bottom:2px;"><img src="http://ttt.sdo.com/web1.0/images/01_01.gif" name="num_img0" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 0);"></td> <td style="padding-bottom:2px;"><img src="http://ttt.sdo.com/web1.0/images/02_01.gif" name="num_img1" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 1);"></td> <td style="padding-bottom:2px;"><img src="http://ttt.sdo.com/web1.0/images/03_01.gif" name="num_img2" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 2);"></td> <td style="padding-bottom:2px;"><img src="http://ttt.sdo.com/web1.0/images/04_01.gif" name="num_img3" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 3);"></td> <td style="padding-bottom:2px;"><img src="http://ttt.sdo.com/web1.0/images/05_01.gif" name="num_img4" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 4);"></td> <td style="padding-bottom:2px;"><img src="http://ttt.sdo.com/web1.0/images/06_01.gif" name="num_img5" width="29" height="22" border="0" align="absmiddle" style="cursor:hand" onClick="chki(this, 5);"></td> </tr> </TABLE></td> </tr> </table> </td> </tr> </table> <SCRIPT LANGUAGE="JavaScript"> <!-- rotateStart(); //--> </SCRIPT> </body> </html>