PHP 向右侧拉菜单实现代码,测试使用中

前端之家收集整理的这篇文章主要介绍了PHP 向右侧拉菜单实现代码,测试使用中前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

这个是由asp二级侧拉菜单改的
<div class="codetitle"><a style="CURSOR: pointer" data="44613" class="copybut" id="copybut44613" onclick="doCopy('code44613')"> 代码如下:

<div class="codebody" id="code44613">
<script language="javascript">
// JavaScript Document startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouSEOver=function() {
this.className+=" over";
}
node.onmouSEOut=function() {
this.className=this.className.replace(" over","");
}
}
}
}
}
window.onload=startList;
<style type="text/css">


<table width="200" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td align="left">
<ul id="nav">
<?PHP
require('../Connections/lr.PHP');
MysqL_select_db($database_lr,$lr); $query = MysqL_query("SELECT FROM bigclass order by sort");
$j=0;
while($row=MysqL_fetch_array($query))
{$j=$j+1;
$bigclassid=$row['bigclassid'];
$bigclassname_leftmenu=$row['bigclassname'];
if ($htmlname==1){
$bigclass_htmlname_leftmenu=$bigclassname_leftmenu;//大类名称
if (substr_count($bigclass_htmlname_leftmenu," ")>0){
$bigclass_htmlname_leftmenu= str_replace(" ","-",$bigclass_htmlname_leftmenu);
}
}
if ($htmlname==0){
$bigclass_htmlnameleftmenu=$bigclassid;
}
?>
  • <a href=""><?php echo $row['bigclassname']?>
    <ul class="ul@R
    301_460@">
    <?PHP
    MysqL_select_db($database_lr,$lr);
    $query_small = MysqL_query("SELECT
    FROM smallclass where bigclassid='$bigclassid' order by sort");
    while($rs=MysqL_fetch_array($query_small))
    {
    $smallclassid_small_leftmenu=$rs['smallclassid'];
    $smallclassname_small=$rs['smallclassname'];//小类名称 if ($htmlname==1){
    $smallclass_htmlname=$smallclassname_small;
    if (substr_count($smallclass_htmlname," ")>0){
    $smallclass_htmlname= str_replace(" ",$smallclass_htmlname);
    }
    }
    if ($htmlname==0){
    $smallclass_htmlname=$smallclassid_small_leftmenu;
    } ?>
  • <a href="" class="my2"><?php echo $rs['smallclassname']?>

  • <?PHP
    } ?>

    <?PHP
    } ?>

    </td></tr></table>

    猜你在找的PHP相关文章