Code
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Header.ascx.cs" Inherits="CustomUI_Head2" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="css/top.css"/>
<style type ="text/css">
#reji{width:990px;
height:25px;
background-color:#4D70D0;}
#reji_1{width:800px;
height:25px;
margin-left:50px;
color:#FFFFFF;}
#reji_1 ul li{float:left;
margin:8px;}
#reji_1 a{color:#FFFFFF;
text-decoration:none;}
#reji_1 a:hover{color:#CCCCCC;}
</style>
<script type="text/javascript" language="javascript">
function closeMenu(Id)
{
var obj=document.getElementById("ChildMenu");
if(obj!=null&&typeof(obj)!="undefined"){
var items=obj.getElementsByTagName("div");
for(var i=0;i<items.length;i++){
items[i].style.display="none";
}
}
}
function showMenu(Id)
{
var lictr= document.getElementById(Id);
lictr.style.backgroundColor="#74C4F6";
var liChild=document.getElementById(Id+"Div");
if(liChild!=null){
liChild.style.display="block";
var liChildSpanId = QueryString("menuz")
if(liChildSpanId!=null){
try{
document.getElementById(liChild.id+"sp"+liChildSpanId).style.backgroundColor="#74C4F6";
}
catch(e){
alert(e);
}
}
}
}
function QueryString(fieldName)
{
var urlString = window.location.href;
if(urlString != null)
{
var typeQu = fieldName+"=";
var urlEnd = urlString.indexOf(typeQu);
if(urlEnd != -1)
{
var paramsUrl = urlString.substring(urlEnd + typeQu.length);
var isEnd = paramsUrl.indexOf('&');
if(isEnd != -1)
{
return paramsUrl.substring(0, isEnd);
}
else
{
return paramsUrl;
}
}
else
return null;
}
else
return null;
}
function InitLoad()
{
closeMenu();
var currentMenu=QueryString("menu");
if(currentMenu!=null)
{
showMenu('li'+currentMenu);
}
}
window.onload=function(){
InitLoad();
}
</script>
</head>
<%--调用说明
.aspx?menu=一级菜单&menuz=二级菜单
--%>
<body>
<div id="top">
<div id="top_banner">
<div id="top_banner_right">
<ul>
<li> <a href ="../Default.aspx">结点首页</a> |</li>
<li>快速导航</li>
</ul>
</div>
</div>
<div id="top_daohang">
<ul>
<li id ="li0" ><a href="E_Default.aspx" >企业首页</a> |</li>
<li id ="li1" ><a href="#" >企业新闻</a> |</li>
<li id ="li2" ><a href="#" >服务产品</a> |</li>
<li id ="li3" ><a href="#">服务团队</a> |</li>
<li id ="li4" ><a href="#">企业帮助</a> |</li>
<li id ="li5" ><a href="#">信息管理</a> |</li>
</ul>
</div>
</div>
<div id="ChildMenu">
<div id="li2Div">
<span id="li2Divsp0">服务列表</span>
<span id="li2Divsp1">产品介绍</span>
<span id="li2Divsp2">服务平台</span>
</div>
<div id="li5Div">
<span id="li5Divsp0">基本信息</span>
<span id="li5Divsp1">找回密码</span>
<span id="li5Divsp2">厂商管理</span>
<span id="li5Divsp3">部门管理</span>
<span id="li5Divsp4">新闻管理</span>
<span id="li5Divsp5">信息反馈</span>
<span id="li5Divsp6">人员管理</span>
<span id="li5Divsp7">队伍管理</span>
<span id="li5Divsp8">服务订阅</span>
<span id="li5Divsp9">社区用户</span>
</div>
</div>
</body>
</html>
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Header.ascx.cs" Inherits="CustomUI_Head2" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="css/top.css"/>
<style type ="text/css">
#reji{width:990px;
height:25px;
background-color:#4D70D0;}
#reji_1{width:800px;
height:25px;
margin-left:50px;
color:#FFFFFF;}
#reji_1 ul li{float:left;
margin:8px;}
#reji_1 a{color:#FFFFFF;
text-decoration:none;}
#reji_1 a:hover{color:#CCCCCC;}
</style>
<script type="text/javascript" language="javascript">
function closeMenu(Id)
{
var obj=document.getElementById("ChildMenu");
if(obj!=null&&typeof(obj)!="undefined"){
var items=obj.getElementsByTagName("div");
for(var i=0;i<items.length;i++){
items[i].style.display="none";
}
}
}
function showMenu(Id)
{
var lictr= document.getElementById(Id);
lictr.style.backgroundColor="#74C4F6";
var liChild=document.getElementById(Id+"Div");
if(liChild!=null){
liChild.style.display="block";
var liChildSpanId = QueryString("menuz")
if(liChildSpanId!=null){
try{
document.getElementById(liChild.id+"sp"+liChildSpanId).style.backgroundColor="#74C4F6";
}
catch(e){
alert(e);
}
}
}
}
function QueryString(fieldName)
{
var urlString = window.location.href;
if(urlString != null)
{
var typeQu = fieldName+"=";
var urlEnd = urlString.indexOf(typeQu);
if(urlEnd != -1)
{
var paramsUrl = urlString.substring(urlEnd + typeQu.length);
var isEnd = paramsUrl.indexOf('&');
if(isEnd != -1)
{
return paramsUrl.substring(0, isEnd);
}
else
{
return paramsUrl;
}
}
else
return null;
}
else
return null;
}
function InitLoad()
{
closeMenu();
var currentMenu=QueryString("menu");
if(currentMenu!=null)
{
showMenu('li'+currentMenu);
}
}
window.onload=function(){
InitLoad();
}
</script>
</head>
<%--调用说明
.aspx?menu=一级菜单&menuz=二级菜单
--%>
<body>
<div id="top">
<div id="top_banner">
<div id="top_banner_right">
<ul>
<li> <a href ="../Default.aspx">结点首页</a> |</li>
<li>快速导航</li>
</ul>
</div>
</div>
<div id="top_daohang">
<ul>
<li id ="li0" ><a href="E_Default.aspx" >企业首页</a> |</li>
<li id ="li1" ><a href="#" >企业新闻</a> |</li>
<li id ="li2" ><a href="#" >服务产品</a> |</li>
<li id ="li3" ><a href="#">服务团队</a> |</li>
<li id ="li4" ><a href="#">企业帮助</a> |</li>
<li id ="li5" ><a href="#">信息管理</a> |</li>
</ul>
</div>
</div>
<div id="ChildMenu">
<div id="li2Div">
<span id="li2Divsp0">服务列表</span>
<span id="li2Divsp1">产品介绍</span>
<span id="li2Divsp2">服务平台</span>
</div>
<div id="li5Div">
<span id="li5Divsp0">基本信息</span>
<span id="li5Divsp1">找回密码</span>
<span id="li5Divsp2">厂商管理</span>
<span id="li5Divsp3">部门管理</span>
<span id="li5Divsp4">新闻管理</span>
<span id="li5Divsp5">信息反馈</span>
<span id="li5Divsp6">人员管理</span>
<span id="li5Divsp7">队伍管理</span>
<span id="li5Divsp8">服务订阅</span>
<span id="li5Divsp9">社区用户</span>
</div>
</div>
</body>
</html>