导航的建立
来源:互联网 发布:python书籍推荐 知乎 编辑:程序博客网 时间:2024/04/28 07:44
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>隐藏表格</title>
<SCRIPT>
function switchSysBar(){
if (switchPoint.innerText==3)
{
switchPoint.innerText=4
document.all("frmTitle").style.display="none"
}
else
{
switchPoint.innerText=3
document.all("frmTitle").style.display=""
}
}
</SCRIPT>
<style type="text/css">
<!--
body {
margin: 0px;
background-color: #ffffff;
}
body,td,th {
color: #000000;
font-size: 12px;
}
-->
</style></head>
<body>
<table width="100%" height="100%" border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td width="19%" align=right valign=top noWrap bgcolor="#e6eefb" id="frmTitle"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<div align="center">
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
font-family: arial, 宋体, serif;
font-size:12px;
}
#nav {
width:160px;
line-height: 24px;
list-style-type: none;
text-align:left;
/*定义整个ul菜单的行高和背景色*/
}
/*==================一级目录===================*/
#nav a {
width: 160px;
display: block;
padding-left:20px;
/*Width(一定要),否则下面的Li会变形*/
}
#nav li {
background:#e6eefb; /*一级目录的背景色*/
border-bottom:#FFF 1px solid; /*下面的一条白边*/
float:left;
/*float:left,本不应该设置,但由于在Firefox不能正常显示
继承Nav的width,限制宽度,li自动向下延伸*/
}
#nav li a:hover{
background:#ffa418; /*一级目录onMouseOver显示的背景色*/
}
#nav a:link {
color:#666; text-decoration:none;
}
#nav a:visited {
color:#666;text-decoration:none;
}
#nav a:hover {
color:#FFF;text-decoration:none;font-weight:bold;
}
/*==================二级目录===================*/
#nav li ul {
list-style:none;
text-align:left;
}
#nav li ul li{
background: #EBEBEB; /*二级目录的背景色*/
}
#nav li ul a{
padding-left:20px;
width:160px;
/* padding-left二级目录中文字向右移动,但Width必须重新设置=(总宽度-padding-left)*/
}
/*下面是二级目录的链接样式*/
#nav li ul a:link {
color:#666; text-decoration:none;
}
#nav li ul a:visited {
color:#666;text-decoration:none;
}
#nav li ul a:hover {
color:#F3F3F3;
text-decoration:none;
font-weight:normal;
background:#295d95;
/* 二级onmouseover的字体颜色、背景色*/
}
/*==============================*/
#nav li:hover ul {
left: auto;
}
#nav li.sfhover ul {
left: auto;
}
#content {
clear: left;
}
#nav ul.collapsed {
display: none;
}
-->
#PARENT{
width:160px;
padding-left:20px;
}
</style>
</div>
<div align="left" id="PARENT" width="100">
<ul id="nav">
<li><a href="#Menu=ChildMenu1" onclick="DoMenu('ChildMenu1')">个人首页</a>
<ul id="ChildMenu1" class="collapsed">
<li><a href="s_score.jsp" target="sf"><img src="../images/lastpost1.gif" width="11" height="10" />成绩查询</a></li>
<li><a href="messages_send.jsp" target="sf"><img src="../images/lastpost1.gif" width="11" height="10" />我的留言</a></li>
<li><a href="cust_view.jsp" target="sf"><img src="../images/lastpost1.gif" width="11" height="10" />个人管理</a></li>
<li><a href="message_view.jsp" target="sf"><img src="../images/lastpost1.gif" width="11" height="10" />我的消息</a></li>
</ul>
</li>
<li><a href="#Menu=ChildMenu2" onClick="DoMenu('ChildMenu2')">公共首页</a>
<ul id="ChildMenu2" class="collapsed">
<li><a href="Notice.jsp" target="sf"><img src="../images/lastpost1.gif" width="11" height="10" />公告通知</a></li>
</ul>
</li>
</ul>
</div>
<script type=text/javascript><!--
var LastLeftID = "";
function menuFix() {
var obj = document.getElementById("nav").getElementsByTagName("li");
for (var i=0; i<obj.length; i++) {
obj[i].onmouseover=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onMouseDown=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onMouseUp=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onMouseUp=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
obj[i].onmouseout=function() {
this.className=this.className.replace(new RegExp("( ?|^)sfhover//b"), "");
}
}
}
function DoMenu(emid)
{
var obj = document.getElementById(emid);
obj.className = (obj.className.toLowerCase() == "expanded"?"collapsed":"expanded");
if((LastLeftID!="")&&(emid!=LastLeftID)) //关闭上一个Menu
{
document.getElementById(LastLeftID).className = "collapsed";
}
LastLeftID = emid;
}
function GetMenuID()
{
var MenuID="";
var _paramStr = new String(window.location.href);
var _sharpPos = _paramStr.indexOf("#");
if (_sharpPos >= 0 && _sharpPos < _paramStr.length - 1)
{
_paramStr = _paramStr.substring(_sharpPos + 1, _paramStr.length);
}
else
{
_paramStr = "";
}
if (_paramStr.length > 0)
{
var _paramArr = _paramStr.split("&");
if (_paramArr.length>0)
{
var _paramKeyVal = _paramArr[0].split("=");
if (_paramKeyVal.length>0)
{
MenuID = _paramKeyVal[1];
}
}
/*
if (_paramArr.length>0)
{
var _arr = new Array(_paramArr.length);
}
//取所有#后面的,菜单只需用到Menu
//for (var i = 0; i < _paramArr.length; i++)
{
var _paramKeyVal = _paramArr[i].split('=');
if (_paramKeyVal.length>0)
{
_arr[_paramKeyVal[0]] = _paramKeyVal[1];
}
}
*/
}
if(MenuID!="")
{
DoMenu(MenuID)
}
}
GetMenuID(); //*这两个function的顺序要注意一下,不然在Firefox里GetMenuID()不起效果
menuFix();
--></script>
<td width="2%" bgcolor=#2d629c>
<table height="100%" cellspacing=0 cellpadding=0 border=0 style="CURSOR: hand;">
<tr>
<td style="HEIGHT: 100%" onClick=switchSysBar()><font style="FONT-SIZE: 12px; CURSOR: hand; COLOR: white; FONT-FAMILY: Webdings"><span id=switchPoint>3</span> </font>
</tr>
</table>
</td>
<td width="77%" style="WIDTH: 100%"><iframe src="tishi.jsp" name="sf" width="100%" height="100%"></iframe></td>
</tr>
</table>
</body>
</html>
- 导航的建立
- 导航栏的建立
- 建立合理的商品类与导航类
- 建立合理的商品类与导航类
- 建立接近最优的导航网格以及基于导航网格的寻路算法
- (安卓)如何根据百度导航官方Demo建立自己的导航工程
- wordpress建立二级导航菜单
- 使用UL 列表结构建立横向导航栏需要注意的问题
- 剖析ASP.NET2.0站点导航功能之建立导航
- 剖析ASP.NET2.0站点导航功能之建立导航
- 剖析ASP.NET2.0站点导航功能之建立导航
- 运用ASP.NET 2.0建立导航层次
- 建立导航控制器和Tab Bar控制器
- 在ASP.NET 2.0中建立站点导航层次
- 在ASP.NET 2.0中建立站点导航层次
- 在ASP.NET 2.0中建立站点导航层次
- 在ASP.NET 2.0中建立站点导航层次
- 在ASP.NET2.0中建立站点导航层次(1)
- 实验用
- C#语言 Visual Studio2005 查询系统 IIS5.1
- 可视化编程工具的迷惑
- AT89S52资料
- 面试考到的问题
- 导航的建立
- 面试考到的一个问题
- JavaScript数据库连接
- 为文件夹添加右键打开命令窗口功能
- Union和Union all 的区别
- asp.net
- 在桌面添加命令行窗口并指定起始位置
- 走在JAVA路上的我。。。。
- 常用正则表达式