本说明: 第一步:把如下代码加入<head>区域中 <SCRIPT language="JavaScript"> <!-- function MM_showHideLayers() { //v2.0 var i, visStr, args, theObj; args = MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr) visStr = args[i+2]; if (navigator.appName == 'Netscape' && document.layers != null) { theObj = eval(args[i]); if (theObj) theObj.visibility = visStr; } else if (document.all != null) { //IE if (visStr == 'show') visStr = 'visible'; //convert vals if (visStr == 'hide') visStr = 'hidden'; theObj = eval(args[i+1]); if (theObj) theObj.style.visibility = visStr; } } }
function MM_preloadImages() { //v2.0 if (document.images) { var imgFiles = MM_preloadImages.arguments; if (document.preloadArray==null) document.preloadArray = new Array(); var i = document.preloadArray.length; with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){ preloadArray[i] = new Image; preloadArray[i++].src = imgFiles[j]; } } } //-->
</SCRIPT>
第二步:在<body>区中加入如下代码 <div id="Layer1" style="position:absolute; left:240px; top:175px; width:306px; height:63px; z-index:1; visibility: hidden"><a href="javascript:if(confirm('http://www.csdn.net/javascript/javascript.zip \n\n这个文件不能通过 Teleport Pro 取回, 因为 服务器报告找不到这个文件. \n\n你想从服务器打开它吗?'))window.location='http://www.csdn.net/javascript/javascript.zip'" tppabs="http://www.csdn.net/javascript/javascript.zip"><font color=green size="5" face="隶书">下载所有Javascript特效!</font></a></font></div> <div id="Layer2" style="position:absolute; left:280px; top:237px; width:147px; height:82px; z-index:2; visibility: visible"> <p align="center"><a href="javascript:if(confirm('http://www.csdn.net/ \n\n这个文件不能通过 Teleport Pro 取回, 因为 地址在一个域或为它的开始地址设定的边界的外部路径上. \n\n你想从服务器打开它吗?'))window.location='http://www.csdn.net/'" tppabs="http://www.csdn.net/" target="_blank"> <img SRC="tb3.jpg" tppabs="http://www.csdn.net/javascript/tb3.jpg" border="0" onMouseDown="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','show')"></a></font><br> </p> </div>
第三步:把<body>区中内容改为: <body bgcolor="#fef4d9" onLoad="MM_preloadImages()">
|