复制代码代码如下::
<span style = "font-size: 14px;"> <! docType html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w.w3.org/tr/xhtml1/dtd/xhtml1-transsitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<kopf>
<meta http-äquiv = "content-type" content = "stexthtml; charset = utf-8">
<title> Menü </title>
<style type = "text/css">
#nav
{
Listenstil: Keine;
Text-Align: Mitte;
}
#nav li
{
float: links;
Breite: 100px;
Farbe: weiß;
Hintergrundfarbe: #3e3e3e;
}
#Speisekarte
{
Listenstil: Keine;
Polsterung: 5px;
Anzeige: Keine;
Rand -Links: -5px;
Rand: -5px;
}
#Menu li
{
Hintergrundfarbe: #CCC;
Breite: 100px;
Text-Align: links;
Padding-Links: 10px;
}
#Menu Li A: Link
{
Textdekoration: Keine;
Anzeige: Block;
}
#Menu Li A: Schwebe
{
Hintergrundfarbe:#3e3e3e;
Farbe: Weiß
}
</style>
</head>
<body>
<ul id = "nav">
<li> 数 据 库
<ul id = "Menü">
<li> <a href = "http://blog.csdn.net/u011043843"> mysql </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> SQL Server </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> Oracle </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> db2 </a> </li>
</ul>
</li>
<li> 前台脚本
<ul id = "Menü">
<li> <a href = "http://blog.csdn.net/u011043843"> JavaScript </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> Ruby </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> html </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> Python </a> </li>
</ul>
</li>
<li> 后台脚本
<ul id = "Menü">
<li> <a href = "http://blog.csdn.net/u011043843"> php </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> ASP </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> ASP.net </a> </li>
<li> <a href = "http://blog.csdn.net/u011043843"> jsp </a> </li>
</ul>
</li>
</ul>
<script type = "text/javaScript">
var lis = document.getElementById ("nav").
var i = 0;
für (i = 0; i <lis.length; i ++)
{
if (lis [i] .ClassName == "Kind")
{
lis [i] .onmouseover = function ())
{
var Ulrobj1 = this.getElementsByTagName ('ul') [0];
Ulrobj1.Style.display = "Block";
this.style.backgroundcolor = "#CCC";
this.style.color = "schwarz";
}
}
lis [i] .onmouseout = function ())
{
var Ulrobj1 = this.getElementsByTagName ('ul') [0]; // dieses 是 htmlelement 对象
Ulrobj1.Style.Display = "Keine";
this.style.backgroundcolor = "#3e3e3e";
this.style.color = "White";
}
}
</script>
</body>
</html> </span>