Maison >développement back-end >tutoriel php >php后管理分类导航菜单
<meta http-equiv="Content-type" c charset="utf-8"> <title>后台管理折叠导航菜单</title> <style><span> body{ margin:0<span>; padding:0<span>; text-align:<span>center; font:normal 12px Arial,Verdana,<span>Tahoma; line-height:150%<span>; } a:link, a:<span>visited{ color:<span>#<span>385065; text-decoration:<span>none; } a:<span>hover{ text-decoration:<span>underline; } <span>#<span>menu{ width:<span>150px; margin:0<span> 15px; padding:0<span>; text-align:<span>left; <span>list-style:<span>none; } <span>#<span>menu .item{ background:<span>#<span>ccaaee; padding:<span>0px; <span>list-style:<span>none; border:1px solid <span>#<span>eee;<span> } a.title:link, a.title:visited, a.title:<span>hover{ display:<span>block; color:<span>#<span>385065; font-weight:<span>bold; padding:2px 0 0<span> 22px; width:<span>128px; line-height:<span>23px; cursor:<span>pointer; text-decoration:<span>none; } <span>#<span>menu .item ul{ border:1px solid <span>#<span>9facb7; margin:0<span>; width:<span>116px; padding:<span>3px 0px 3px 30px; bakground:<span>#<span>fff;<span>list-style:<span>none; display:<span>none; } <span>#<span>menu .item ul li{ display:<span>block; } </style> <script type="text/javascript"> <span>function<span> hideAllObj(){ <span>var items = document.getElementsByClassName("option"<span>); <span>for(<span>var j=0; j<items.length; j++<span>){ items[j].style.display = "none"<span>; } } <span>function<span> check(){ document.getElementById("opt_1").style.display = "block"<span>; <span>var items = document.getElementsByClassName("title"<span>); <span>for(<span>var j=0; j<items.length; j++<span>){ items[j].onclick = <span>function<span>(){ <span>var obj = document.getElementById("opt_" + this.<span>name); <span>if(obj.style.display != "block"<span>){ hideAllObj(); obj.style.display = "block"<span>; }<span>else<span>{ obj.style.display = "none"<span>; } } } } document.getElementsByClassName=<span>function<span>(classname){ <span>var retnode =<span> []; <span>var myclass = <span>new RegExp('\\b'+classname+'\\b'<span>); <span>var elem = this.getElementsByTagName('*'<span>); <span>for(<span>var j=0; j<elem.length; j++<span>){ <span>var classes = elem[j].<span>className; <span>if(myclass.<span>test(classes)){ retnode.<span>push(elem[j]); } } <span>return<span> retnode; } </script> class="item"><a>class="title" name="1">用户管理</a>
以上就介绍了php后管理分类导航菜单,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。