在每个模版里header.htm文件里找到
</head>
在它前面加上
以下为引用的内容:
<SCRIPT language=JavaScript type=text/JavaScript> function MM_findObj(n, d) { 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() { 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>
|
查找
| <a href='search.php'>搜索</a>
在后面加上
以下为引用的内容:
<div id=Layer2 style="Z-INDEX: 1; WIDTH: 700px; POSITION: absolute; HEIGHT: 200px"><div id=sub_2 onMouseOver="MM_showHideLayers('sub_2','','show');" style="Z-INDEX: 11; LEFT: 0 px; VISIBILITY: hidden; WIDTH: 80px; POSITION: absolute; TOP: 15px; HEIGHT: 100px" onMouseOut="MM_showHideLayers('sub_2','','hide');"> <!-- EOT; $fp=opendir(R_P."data/style/"); while ($file=readdir($fp)){ if (eregi("\.php$",$file)) { $file=str_replace(".php","",$file); $choseskin.="<tr><td align=center onMouseOver='this.style.backgroundColor=\"#e7df42\"' onMouseOut='this.style.backgroundColor=\"\"'><a title=$file href=index.php?skinco=$file>$file</td></tr>"; } }closedir($fp); print <<<EOT --> <table style="border: 1px;border-right-color: #e7df42;border-left-color: #CCCCCC;border-bottom-color: #e7df42;border-top-color: #CCCCCC;BORDER-STYLE: solid;" cellspacing=0 cellpadding=5px width=70px bgcolor=#F7F7F7> $choseskin</table></div> | <a href="#" onMouseOver="MM_showHideLayers('sub_2','','show')" onMouseOut="MM_showHideLayers('sub_2','','hide')">风格</a>
|
好了,风格切换代码完成!
本人第一次做,有什么多余的地方请高手指出!