无限级别菜单的实现
时间:2008-05-13 来源:剑心通明
query($Sql);
while($Result=$Tree->fetch_array($QueryChild)) { //取出孩子节点
$Space="";
for($j=0;$jquery_first($ChildSql);
$TableId="ta".trim($Result[0]); //设置表格Id
$TablePic="ta".trim($Result[0])."pic"; //设置图片Id
if($ChildResult[0]
" class="F1">
" style="display=none" cellspacing="0" cellpadding="0">
" src="parent.gif" border="0" align="absmiddle" width="35" height="17">" class="F1">
" style="display=none" cellspacing="0" cellpadding="0">
无限级菜单测试
function expands(expid,picid) //显示图片张合的Js
{ // alert("this.document.all["+expid+"].style.display");
if(this.document.all[expid].style.display=="none")
{ this.document.all[expid].style.display="block";
this.document.all[picid].src="leaf.gif";
}
else
{
this.document.all[expid].style.display="none";
this.document.all[picid].src="parent.gif";
}
}
connect();//连接数据库,可根据需要换成自己的代码
$Sql="select DepartmentId,DepartmentName from test where length(DepartmentId)=3";//提出最上层节点(祖宗节点),根据需要自己修改
$Result=$Tree->query_first($Sql);
?>
">
相关阅读 更多 +