Здравейте! Помъчих се да си напиша код за падащо меню, но нещо не става. Къде е грешката в кода ?
Код:
<html>
<head>
<script>
function showSubmenu(id) {
document.getElementById(id).style.display="block";
function hideSubmenu(id) {
document.getElementById(id).style.display="none";
};
</script>
<style>
#menu {
width: 150px;
height: 30px;
background-color: #000;
-moz-border-radius: 3px;
text-align: center;
float: center;
color: #FFF;
}
#submenu {
width: 150px;
height: 30px;
background-color: #00FF00;
-moz-border-radius: 3px;
text-align: center;
float: center;
margin: 50px;
dislpay: none;
}
</style>
</head>
<body>
<center>
<div id="menu" onmouseover="showSubmenu('submenu')" onmouseout="hideSubmenu('submenu')">
AAAAAAAAA
</div>
</center>
</body>
</html>