示例:JavaScript编写变色菜单



<html>

<body>

<script language="JavaScript">

    function openme(object)
    {
        object.style.background="#FFFFCC";
    }

    function closeme(object)
    {
        object.style.background="#99FFFF";
    }

</script>                    

<table border="1" cellspacing="2" width="30%" bgcolor="#99FFFF" cellpadding="2" class=p2>
    <tr>
        <td align="center" width="15%" onMouseOver="openme(this);" onMouseOut="closeme(this);">
            <a href="http://www.hongen.com/pc/index.htm">
                <strong>电脑乐园</strong>
            </a>
        </td>
        <tr>
        <td align="center" width="15%" onMouseOver="openme(this);" onMouseOut="closeme(this);">
            <a href="http://www.hongen.com/eng/index.htm" >
                <strong>轻松英语</strong>
            </a>
        </td>
    </tr>
    <tr>
        <td align="center" width="15%" onMouseOver="openme(this);" onMouseOut="closeme(this);">
            <a href="http://www.hongen.com/proedu/index.htm" >      
               <strong>继续教育</strong>
            </a>
        </td>
    </tr>
    <tr>
        <td align="center" width="15%" onMouseOver="openme(this);" onMouseOut="closeme(this);">
            <a href="http://www.hongen.com/album/index.htm">
                <strong>同窗名录</strong>
            </a></td>
    </tr>
    <tr>
        <td align="center" width="15%" onMouseOver="openme(this);" onMouseOut="closeme(this);">
            <a href="http://www.hongen.com/edu/index.htm">
                <strong>动感校园</strong>
            </a>
        </td>
    </tr>
</table>
</body>
</html>

评论
发表评论

您还没有登录,请登录后发表评论

holdbelief
搜索本博客
最近加入圈子
存档
最新评论