PHP向右侧拉菜单,测试使用中
来源:互联网 发布:excel复制一列数据 编辑:程序博客网 时间:2024/04/30 12:37
这个是由asp二级侧拉菜单改的
<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;
</script>
<style type="text/css">
<!--
ul {
margin: 0;
padding: 0;
list-style: none;
width: 200px; /* Width of Menu Items */
border-bottom: 0px solid #ccc;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 199px; /* Set 1px less than menu width */
top: 0;
display: none;
}
/* Styles for Menu Items */
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #8A0000; /* IE6 Bug */
padding: 5px;
border: 0px #ccc; /* IE6 Bug */
border-bottom: 0;
}
/* Holly Hack. IE Requirement /*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */
li:hover ul, li.over ul { display: block; } /* The magic */
.ulbox{border:1px solid #ffffff;overflow:hidden;margin-left:1px;background-color:#E87DDD}
-->
</style>
<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_htmlname_leftmenu=$bigclassid;
}
?>
<li><a href=""><?php echo $row['bigclassname']?></a>
<ul class="ulbox">
<?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;
}
?>
<li><a href="" class="my2"><?php echo $rs['smallclassname']?></a></li>
<?php
} ?>
</ul>
</li>
<?php
} ?>
</ul>
</td></tr></table>
原文地址:http://www.corange.cn/archives/2009/09/3444.html
- PHP向右侧拉菜单,测试使用中
- DrawerLayout:左右侧拉菜单
- css二级侧拉菜单,右侧拉开菜单,右侧展开菜单
- DrawerLayout:左右侧拉菜单+NavigationView:导航视图
- 嵌入式 php在下拉菜单中显示已经存在用户名
- 左右侧滑菜单的使用
- optionMenu 右侧菜单的简单使用
- Android4.3模拟器界面中右侧菜单按钮无法使用问题解决办法
- Android4.3模拟器界面中右侧菜单按钮无法使用问题解决办法
- 中向菜单
- 左右侧拉
- 安卓开发--左侧或右侧出来的popuwindows替代drawerlayout侧拉菜单
- PHP中下拉菜单里的值从数据库中调用的代码。
- 右侧浮动菜单
- jquery右侧菜单
- 使用DrawerLayout实现侧拉菜单
- 使用DrawerLayout实现侧拉菜单
- 使用DrawerLayout实现侧拉菜单
- php168_cms中提取的验证码
- 跨页投递和Transfer的区别
- 开通
- 球,你别跑。爸爸等你呢
- Web套打方案集锦
- PHP向右侧拉菜单,测试使用中
- log4j日志文件乱码问题的解决方法
- hibernate3.0以上处理批量删除批量修改
- XML 和 Unicode
- C#委托基础:谈委托和接口
- DB2临时表在SQL过程
- solidworks 二次开发
- sql server 2000 全文索引全解
- iPhone开发指南-应用程序核心