想点击按钮时在按钮上显示菜单层 要怎么做哦?
请教了

解决方案 »

  1.   

    在按钮上显示菜单层?  是点击后浮出层遮盖住按钮吗?
    你看看是不是这样的:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>demo</title>
    </head>
    <body>
        <div style="height: auto; width: 60px;">
            <div id="divMenus" style="background-color: Teal; position: absolute; display:none;" onclick='document.getElementById("divMenus").style.display="none"'>
                菜单排版内容 ....<br />
                菜单排版内容 ....<br />
                菜单排版内容 ....<br />
            </div>
            <input id="btnShowMenu" type="button" value="Show Menus" onclick='document.getElementById("divMenus").style.display="block"' />
        </div>
    </body>
    </html>