在A页面点击一个按钮弹出一个层,层之外其他的页面部分全部灰暗...
参考支付宝网上支付那种,在选中一个网银点击去网上支付然后就弹出一个层,上面2个按钮一个是已完成充值,一个是充值遇到问题...
各位帮帮忙..!

解决方案 »

  1.   

    我想要层那种效果...不是showModelDialog()...
      

  2.   

    LZ可以这样实现效果:
    <div style="background:#000;left:0;top:0; position:absolute;filter:alpha(opacity=50); width:100%;height:100%">11111</div>这个div就是模态,div里面可以写LZ想写入的内容.
      

  3.   

    其实很简单的:
    <html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>Title</title>    <style type="text/css">
        #mask {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.3);
            display: none;
        }
        
        #box {
            position: absolute;
            top: 30%;
            left: 30%;
            width: 400px;
            height: 200px;
            background: white;
        }
        </style>    <script src="jquery.js"></script>
        <script type="text/javascript">
        $(function() {
            $("#show-mask").click(function() {
                $("#mask").show();
            });
            
            $("#close").click(function() {
                $("#mask").hide();
            });
        });
        </script>
    </head><body>
        <input type="button" id="show-mask" value="Show Mask">
        <div id="mask">
            <div id="box">
                <input type="button" value="Close" id="close">
            </div>
        </div>
    </body>
    </html>
      

  4.   

    mask的背景不要使用opacity,因为opacity也会把他的子部件全部半透明化,要使用rgba(...)