中文(简体)
<!-- 把如下代码加入<body>区域中 --> <!-- Saved From url=http://www.downcodes.com/js --> <!-- 网页设计论坛 url=http:/ /www.downcodes.com/bbs--> <style type="text/css"> <!-- .topnewstitle { font-family: 体;字体大小:10pt; A:hover {color:blue;text-decoration:underline } } #topdeck { display:block;左:0px;顶部:0px;位置:绝对;可见性:隐藏; z 索引:100; } .content { 字体大小:10pt; font-family: 宋体;颜色:#000000; } //--> </style> <script> var isNS4=(document.layers) ? 1:0; var isIE4=(document.all)? 1:0; var isMoz=((document.getElementById) && !(isIE4)) ? 1:0;函数 ShowNavigateur() { 警报(isNS4);警报(是IE4);警报(isMoz); } 函数 activate_mousemove(function_mouse) { if(isNS4||isMoz) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = function_mouse; } function get_mouse(e) { var mouse=new Array();鼠标.x=0;鼠标.y=0; if(isNS4||isMoz){ mouse.x=e.pageX; mouse.y=e.pageY; }否则 if(isIE4){ mouse.x=event.x+document.body.scrollLeft; mouse.y=event.y+document.body.scrollTop;返回鼠标; } 函数 get_layer(名称) { if(isNS4){ 层=findLayer(名称, 文档); //if(layer==null) //alert('Pb de layer');返回层; } else if (isIE4){ //window.status=document.all[name];返回文档.all[名称]; } else if (isMoz) { return document.getElementById(name); } //alert('Pb de noms');返回空值; } 函数 findLayer(name, doc) { var i, 层; //警报(doc.layers.length); for (i = 0; i < doc.layers.length; i++) { 层 = doc.layers[i]; //警报(图层名称); if (layer.name == name) 返回图层; if (layer.document.layers.length > 0) if ((layer = findLayer(name, layer.document)) != null) 返回图层;返回空值; } function hide_layer(layer) { if(layer==null){ //window.status="图层缓存?cacher";返回; } if (isNS4){ layer.visibility = "隐藏"; } if (isIE4||isMoz){ layer.style.visibility = "隐藏"; } } 函数 show_layer(layer) { if(isNS4){ layer.visibility = "show"; } if(isIE4||isMoz){ layer.style.visibility = "可见"; } } function move_layer_to(layer, x, y) { //window.status=layer; if (isNS4) { 层.moveTo(x, y); } if (isIE4||isMoz){ //window.status=layer.style;图层样式.left = x;图层样式.top = y; } } function setzIndex(layer, z) { if(isNS4) layer.zIndex = z; if(isIE4||isMoz) layer.style.zIndex = z; } 函数modify_content_layer(layer,content) { if(isNS4){ layer.document.write(content);图层.文档.关闭(); } else if(isIE4||isMoz){ layer.innerHTML=content; } } </script> <div class="popup" id="topdeck"></div> <palign="center"> <script language="Javascript"> <!-- var adroite = false; activate_mousemove(get_mouse2);函数 tux(标题、文本、estadroite) { adroite = estadroite;变量内容; if (adroite) content = "<table border=0 width=300 cellpadding=0 cellspacing=0><tr><td width=100> </td><td width=200><table border=0 cellpadding= 0 个单元格间距=0 bgcolor="#000000" width=200><tr height=2><td><img src="../wydh/images/135/pixel.gif"></td> </tr><tr><tdalign=center><table border=0 cellpadding=2 cellspacing=0 width=196 bgcolor=white class="content"><tr><td bgcolor=white><center> <b>“+标题+”</b></center>“+文本+”</td></tr></table></td></tr></table></td></tr ><tr><td><img src="../wydh/images/135/w15.gif"></td><td valign=top><img src="../wydh/images /135/bulle-g.gif"></td></tr></table>"; else content = "<表格边框=0 宽度=300 cellpadding=0 cellspacing=0><tr><td 宽度=200><表格边框=0 cellpadding=0 cellspacing=0 bgcolor=黑色宽度=200><tr height=2><td></td></tr><tr><tdalign=center><table border=0 cellpadding=2 cellspacing=0 width=196 bgcolor=white class="content">< tr><td bgcolor=white><center><b>"+标题+"</b></center>"+text+"</td></tr></table></td></tr> </table></td><td width=100></td></tr><tr><td valign=top></td><td></td></tr></table> ”; l=get_layer("topdeck");修改_内容_层(l,内容)show_layer(l); } 函数 get_mouse2(e) { 鼠标=get_mouse(e); l=get_layer("topdeck"); var x = 鼠标.x; var y = 鼠标.y;如果(熟练)x=x+15;否则x=x-315; move_layer_to(l,x,y); } 函数kill() { l=get_layer("topdeck");隐藏层(l); } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=新图像; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v3.0 var p,i,x; if(!d) d=文档; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);返回x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=新数组; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } // --> </script> <a href="#" class="topnewstitle" onmouseout="kill()" onmouseover="javascript:tux('链接title可以这样哟', '用onmouseover来冒充一下title,你可以再美化一下这个界面', false)">鼠标移过来看看</a>