Navigation menu (move to show sub-menu), navigation menu sub-menu
The Code is as follows:
<! DOCTYPE html>
Move the mouse over a menu on the webpage, and a row of sub-menus are displayed below
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "www.w3.org/..al.dtd">
<Html xmlns = "www.w3.org/5o/xhtml">
<Head>
<Title> simple and practical secondary drop-down menu </title>
<Meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<Style type = "text/css">
Body {
Text-align: center;
Font-size: 12px;
}
Ul {
Padding 0;
Margin: 0;
List-style: none;
}
Li {
Position: relative;
Float: left;
Width: 110px;
}
Li ul {
Position: absolute;
Display: none;
Top: 20px; left: 30px;
}
Li: hover ul, li. over ul {
Display: block;
}
</Style>
<Script type = "text/javascript">
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>
</Head>
<Body>
<! -- Add the following code to the <body ...... remaining full text>
Aspnet uses the menu Control for navigation to achieve horizontal menu, move the mouse over the menu item, and how does the xml of the sub-menu effect pop-up below?
<? Xml version = "1.0" encoding = "UTF-8"?>
-<Menus>
-<MenuItem>
<Text> 1 </Text>
<ItemID> 1000 </ItemID>
<ParentItemID> 0 </ParentItemID>
<IsModule> 1 </IsModule>
<Level> 1 </Level>
</MenuItem>
-
-<MenuItem>
<Text> 1 </Text>
<ItemID> 100001 </ItemID>
<ParentItemID> 1000 </ParentItemID>
<IsModule> 0 </IsModule>
<Level> 2 </Level>
</MenuItem>
-<MenuItem>
<Text> 2 </Text>
<ItemID> 100002 </ItemID>
<ParentItemID> 1000 </ParentItemID>
<IsModule> 0 </IsModule>
<Level> 2 </Level>
</MenuItem>
-<MenuItem>
<Text> 2 </Text>
<ItemID> 1100 </ItemID>
<ParentItemID> 0 </ParentItemID>
<IsModule> 1 </IsModule>
<Level> 1 </Level>
</MenuItem>
-<MenuItem>
<Text> 1 </Text>
<ItemID> 110001 </ItemID>
<ParentItemID> 1100 </ParentItemID>
<IsModule> 0 </IsModule>
<Level> 2 </Level>
</MenuItem>
-<MenuItem>
<Text> 2 </Text>
<ItemID> 110002 </ItemID>
<ParentItemID> 1100 </ParentItemID>
<IsModule>... the remaining full text>