中文(简体)
网页中有三个连接,实现的效果为:点击连接弹出一个新的小窗口,在小窗口中显示内容!窗口切换的时候带过渡效果,而且窗口有关闭功能。
<html> <head> <title>点击连接显示和隐藏过渡效果的图层</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; 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); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_showHideLayers() { //v6.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args<i>))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; } obj.visibility=v; } } //--> </script> </head> <body > <table width="392" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td width="17"><div align="center"></div></td> <td width="363"> <SPAN style="CURSOR: hand" onclick=Show(xk_poplod);MM_showHideLayers('er','','hide');MM_showHideLayers('san','','hide')><a href="#" >注册未使用的用户</a></SPAN> <div id=xk_poplod style="FILTER: revealTrans(transition=12,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; width: 271px; visibility: hidden;"> <table width="270" border="0" cellpadding="0" cellspacing="1" bgcolor="#666666"> <tr> <td width="268" height="24" bgcolor="#CCCCCC"><div align="center"><strong>注册未使用的用户</strong></div></td> </tr> <tr> <td bgcolor="#ECEDEB"><table width="94%" height=114 border=0 align="center" cellpadding=0 cellspacing=0 class=pop> <tbody> <tr> <td> <p> 您可以发50的倍数为手机充值。现在充值可得1.7元返款优惠(7月31日前有效),询025-83205608或10010!每用户只可享受优惠价一次,送完即止. </p></td> </tr> <tr> <td> <div align=right> <span style="CURSOR: hand" onClick=Hide(xk_poplod)>关 闭</span></div></td> </tr> </tbody> </table></td> </tr> </table> </div> <div id=er style="FILTER: revealTrans(transition=12,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; width: 271px; visibility: hidden;"> <table width="270" border="0" cellpadding="0" cellspacing="1" bgcolor="#666666"> <tr> <td width="268" height="24" bgcolor="#CCCCCC"><div align="center"><strong>新注册的用户</strong></div></td> </tr> <tr> <td bgcolor="#ECEDEB"><table width="94%" height=114 border=0 align="center" cellpadding=0 cellspacing=0 class=pop> <tbody> <tr> <td> <p> 您可以发送50的倍数为手机充值。现在充值可得1.7元返款优惠(7月31日前有效),询025-83205608或10010!每用户只可享受优惠价一次,送完即止.</p></td> </tr> <tr> <td> <div align=right> <span style="CURSOR: hand" onClick=Hide(er)>关 闭</span></div></td> </tr> </tbody> </table></td> </tr> </table> </div> <div id=san style="FILTER: revealTrans(transition=12,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; width: 271px; visibility: hidden;"> <table width="270" border="0" cellpadding="0" cellspacing="1" bgcolor="#666666"> <tr> <td width="268" height="24" bgcolor="#CCCCCC"><div align="center"><strong>有过1次以上充值的历史的用户 </strong> </div></td> </tr> <tr> <td bgcolor="#ECEDEB"><table width="94%" height=114 border=0 align="center" cellpadding=0 cellspacing=0 class=pop> <tbody> <tr> <td> <p> 您现在用捷银移动支付充值,可获得1.2元返款优惠(7月31日前有效),以后充值还有优惠!询025-83205608或10010 </p></td> </tr> <tr> <td> <div align=right> <span style="CURSOR: hand" onClick=Hide(san)>关 闭</span></div></td> </tr> </tbody> </table></td> </tr> </table> </div> <div align="center"></div> <div align="center"> <script language=JavaScript1.2> <!-- function Show(divid) { divid.filters.revealTrans.apply(); divid.style.visibility = "visible"; divid.filters.revealTrans.play(); } function Hide(divid) { divid.filters.revealTrans.apply(); divid.style.visibility = "hidden"; divid.filters.revealTrans.play(); } //--> </script> </div></td> </tr> <tr> <td><div align="center"></div></td> <td> <SPAN style="CURSOR: hand" onclick=Show(er);MM_showHideLayers('xk_poplod','','hide');MM_showHideLayers('san','','hide')><a href="#">新注册的用户</a></SPAN> </td> </tr> <tr> <td><div align="center"></div></td> <td> <SPAN style="CURSOR: hand" onclick=Show(san);MM_showHideLayers('xk_poplod','','hide');MM_showHideLayers('er','','hide')><a href="#">有过1次以上充值的历史的用户</a></SPAN> </td> </tr> </table> </body> </html>