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

// JavaScript Document

startList = function() {

if (document.all && document.getElementById) {

navRoot = document.getElementById("nav");

for (i=0; i

node = navRoot.childNodes[i];

if (node.nodeName=="LI") {

node.οnmοuseοver=function() {

this.className+=" over";

}

node.οnmοuseοut=function() {

this.className=this.className.replace(" over", "");

}

}

}

}

}

window.οnlοad=startList;

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_htmlname_leftmenu=$bigclassid;

}

?>

<?php echo $row[‘bigclassname‘]?>

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;

}

?>

<?php echo $rs[‘smallclassname‘]?>

} ?>

} ?>

原文:http://www.jb51.net/article/20737.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值