Webmaster общности: Predpriemach.com | SearchEngines.bg

    DHTML навигационно меню

    Първо трябва да създадем стиловете:

    <style type="text/css">
    <!--
    
    .Navlink {COLOR: #008833; TEXT-DECORATION: none; font-family: verdana; font-size: 9pt; font-weight: bold;}
    a:link.Navlink {color : #008833;}
    a:visited.Navlink {color : #008833;}
    a:active.Navlink {text-decoration: none;}
    a:hover.Navlink {text-decoration: none;}
    
    -->
    </style>

    След това преминаваме към най-важната част … JavaScript-а:

    <script language = "javascript">
    <!--
    
    function LmOver(elem, clr)
    {elem.style.backgroundColor = clr;
    elem.children.tags('A')[0].style.color = "#0055aa";
    elem.style.cursor = 'hand'}
    
    function LmOut(elem, clr)
    {elem.style.backgroundColor = clr;
    elem.children.tags('A')[0].style.color = "#008833";}
    
    function LmDown(elem, clr)
    {elem.style.backgroundColor = clr;
    elem.children.tags('A')[0].style.color = "#0055aa";}
    
    function LmUp(path)
    {location.href = path;}
    
    //-->
    </script>
    

    ВАЖНО: СТИЛОВЕТЕ И JAVASCRIPT-А ТРЯБВА ДА СА ПОСТАВЕНИ В HEAD.

    И след като направим всичко отиваме на HTML частта:

    <table border="0" width="150" bgcolor="#000000" cellspacing="0" cellpadding="0">
    <tr><td width="100%">
    
    <table border="0" width="100%" cellspacing="1" cellpadding="3">
    <tr><td width="100%" onMouseover="LmOver(this, '#CCCCCC')" onMouseout="LmOut(this, '#EEEEEE')" onMouseDown="LmDown(this, '#CCCCCC')"
    onMouseUp="LmUp('http://www.web-tourist.net')" bgcolor="#EEEEEE"><A HREF="http://www.web-tourist.net" Class="navlink"> Web-Tourist</a></td></tr>
    <tr><td width="100%" onMouseover="LmOver(this, '#CCCCCC')" onMouseout="LmOut(this, '#EEEEEE')" onMouseDown="LmDown(this, '#CCCCCC')"
    onMouseUp="LmUp('http://www.web-tourist.net/forum/profile.php?mode=viewprofile&u=557')" bgcolor="#EEEEEE"><A HREF="http://www.web-tourist.net/forum/profile.php?mode=viewprofile&u=557" Class="navlink"> LinuxBG</a></td></tr>
    </table>
    </td></tr>
    </table>

    Оставете коментар