中文(简体)
<!-- bbs http://www.downcodes.com/bbs--> <!-- 将以下代码添加到<head>区域内 --> <SCRIPT language=JavaScript> var isCSS = false; var isW3C = false; var isIE4 = false; var isNN4 = false; var isIE6 = false; var isGecko = false; var isOpera = false; var isDHTML = false; var 抑制菜单 = false;函数 autoconfig() { if(document && document.images) { isCSS = (document.body && document.body.style) ?真:假; isW3C = (isCSS && document.getElementById) ?真:假; isIE4 = (isCSS && document.all && readIEVer() >= 4.0) ?真:假; isNN4 = (文档.层) ?真:假; isGecko = (isCSS && navigator && navigator.product && navigator.product == "Gecko"); isOpera = (isCSS && navigator.userAgent.indexOf( "Opera") != -1 ); isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ?真:假; isIE6 = ( isIE6CSS && readIEVer() >= 6.0 ); isDHTML = isCSS && ( isIE4 || isGecko || isOpera ); if(suppressMenus || ( isOpera && readOperaVer() < 7 ) || ( isGecko && navigator.productSub <= 20011022 ) || ( isGecko && navigator.productSub == 20030107 ) ) { // Opera 6.x 似乎没有喜欢 DHTML... // Netscape 6.2 将菜单放在错误的位置... // Safari,菜单不会消失... ResetMenu 中的问题 isDHTML = false; } } } function readIEVer() { var agent = navigator.userAgent; var offset = agent.indexOf( "MSIE" ); if( 偏移量 < 0 ) { 返回 0; return parseFloat( agent.substring( offset + 5, agent.indexOf( ";", offset ) ) ); } function montage( href, src, title, width, animate ) { // 这是不支持过滤器的浏览器的情况... var Cycle = Math.floor( Math.random() * href.length ); // 如果我们没有使用宽带,则关闭动画 var m_montage = ( typeof(animate) != "undefined" ? animate : hasBroadband() ); if( m_montage == false || src.length <= 1 || !( isIE4 || isW3C ) ) { montagePicker( href, src, 标题, 周期 );返回; } // 构建所有嵌套的 DIV monIdx = Cycle; document.writeln( "<div id="容器" style="宽度:" + 宽度 +"px;高度:112px">" ); for( i = 0; i < src.length; i++ ) { // 设置占位符 document.writeln( "t<div id="montage" + i + "" style="display:none ”>”); montagePicker( href, src, 标题, i ); document.writeln( "t</div>" ); } document.writeln( "</div>" ); // 取出图像 monBlock = new Array( src.length ); monImg = 新数组( src.length ); for( i = 0; i < src.length; i++ ) { monBlock[i] = document.getElementById( "montage" + i ).style; monImg[i] = document.getElementById( "monimg" + i ); if( monImg[i] == null ) { montagePicker( href, src, 标题, i );返回; } // 警报(“foo”); monContainer = document.getElementById("容器");蒙太奇效果(); } 函数 montageEffects() { var nextImage = (monIdx + 1) % monImg.length; // 运行过渡 if( readIEVer() >= 4.0 ) { monContainer.style.filter = "blendTrans(duration=1.5) RevealTrans(duration=1.0,transition=7)"; monContainer.filters(0).apply(); monContainer.filters(1).apply();蒙太奇选择(下一个图像); monContainer.filters(0).play(); monContainer.filters(1).play(); } else { 蒙太奇选择( nextImage ); } // 要求稍后再次调用 setTimeout( "montageSwap()", monTimeout ); } function montageSelect( nextImage ) { //alert( monImg[monIdx].style.visibility ); monBlock[monIdx].display = "无"; monIdx = 下一个图像; monBlock[monIdx].display = "块"; } function montageSwap() { if( monImg[monIdx].complete ) { // 沿着 montageEffects() 移动图像索引; } else { // 3秒后再次检查 setTimeout( "montageSwap()", 3000 ); } } function montagePicker( href, src, Caption, Cycle ) { if( href[cycle] != null ) { document.writeln( "tt<A HREF="" + href[cycle] + "" ><IMG SRC="" + src[周期] + "" alt="" + 标题[周期] + "" BORDER="0" ID="monimg" + 周期 + "" ></a>"); } else { document.writeln( "tt<IMG SRC="" + src[cycle] + "" ID="monimg" + Cycle + "">" ); } } 函数 hasBroadband() { if( readIEVer() < 5.0 ) { return false; } 尝试{ document.body.addBehavior ("#default#clientCaps"); return ( typeof(document.body.connectionType) != "undefined" && document.body.connectionType == "lan" ); } catch( e ) { 返回 false; } } //来自http://www.downcodes.com的更多javascript </SCRIPT> <!-- 将以下代码添加到<body>区域内 --> <TABLE cellSpacing=0 cellPadding=0 border=0> < TBODY> <TR> <TD width=122> <SCRIPT 语言=JavaScript 类型=text/javascript> autoconfig(); monTimeout = 2000; var urls = new Array(); var imgs = new Array(); var caps = new Array(); urls[0] = "http://www.downcodes.com"; imgs[0] = "/img/200406301.jpg"; caps[0] = "说明一"; urls[1] = "http://www.downcodes.com"; imgs[1] = "/img/200406302.jpg"; caps[1] = "说明二"; urls[2] = "http://www.downcodes.com"; imgs[2] = "/img/200406303.jpg"; caps[2] = "说明三"; urls[3] = "http://www.downcodes.com"; imgs[3] = "/img/200406304.jpg"; caps[3] = "说明四"; urls[4] = "http://www.downcodes.com"; imgs[4] = "/img/200406305.jpg"; caps[4] = "说明五";蒙太奇( urls, imgs, caps, 461 ); </脚本> </TD> </TR> </TBODY></表>