欢迎进入极速独立站群官方网! 咨询电话:13135381668 销售QQ:1000207

独立站群

当前位置:首页 - - 独立站群 - 站群操作 - 文章详情
编辑推荐

站群栏目调用切换三级

浏览:3393 发布时间:2021-07-06
<div class="qlist">
<div id="tab3">
<ul>
<? 
$query=$db->query("select * from ".$LG->table("arclass")." where menunumber like '".substr($CN,0,4)."%' and level=2 order by sortnum desc,id desc limit 10");
$i = 0;
while($rs=$db->fetchrow($query)){
?>
<li onmouSEOver="setTab(3,<? echo $i?>)"  <? if($i == 0) echo 'class="now"';?> ><? echo $rs["menuname"];?></li>
<? 
$i++;
}?>
<span> </span>
</ul>
</div>
<div id="tablist3">

<? 
$query=$db->query("select * from ".$LG->table("arclass")." where menunumber like '".substr($CN,0,4)."%' and level=2 order by sortnum desc,id desc limit 10");
$i = 0;
while($rs=$db->fetchrow($query)){
?>
<div class="tablist <? if($i == 0) echo 'block';?>"> 
<div class="leixing">
<dt>栏 &nbsp;&nbsp;&nbsp;目:</dt>
<dd>
<? 
$que=$db->query("select * from ".$LG->table("arclass")." where menunumber like '".$rs['menunumber']."%' and level=3 order by sortnum desc,id desc limit 10");
while($rss=$db->fetchrow($que)){
?>
<a href="<? echo getcurl($rss["id"]);?>"><? echo $rss["menuname"];?></a>
<? }
?>
</dd>
</div>
</div>
<? $i++;}?>
</div>
<script type="text/javascript"> 
function setTab(m,n){ 
var menu=document.getElementById("tab"+m).getElementsByTagName("li"); 
var div=document.getElementById("tablist"+m).getElementsByTagName("div"); 
var showdiv=[]; 
for (i=0; j=div[i]; i++){ 
if ((" "+div[i].className+" ").indexOf(" tablist ")!=-1){ 
showdiv.push(div[i]); 
} } 
for(i=0;i<menu.length;i++) { 
menu[i].className=i==n?"now":""; 
showdiv[i].style.display=i==n?"block":"none"; 
} } 
</script>
</div>