两个页面弹出层的例子

1.       弹出层

Css:

/*弹出层样式*/

.MaskPanel {

background-color: #000;

position: absolute;

display: none;

left: 0px;

top: 0px;

opacity: 0.5;

filter: alpha(opacity=50);

z-index: 99;

}

.MaskContent {

position: fixed;

top: 40%;

left: 50%;

margin-top: -50px;

margin-left: -140px;

display: none;

z-index: 100;

}

.masksection {

background: none repeat scroll 0 0 #333333;

border: 1px solid #333333;

border-radius: 5px 5px 5px 5px;

margin: 10% auto;

padding: 10px;

width: 240px;

}

.b-Tel {

color: #FFFFFF;

font-family: 微软雅黑;

font-size: 18px;

margin-bottom: 5px;

}

.b-Telb {

margin-bottom: 10px;

}

.M-sure {

width: 100%;

margin: 0 auto;

}

.inputFour {

background: none repeat scroll 0 0 #3C3C3C;

border: 1px solid #111111;

border-radius: 4px 4px 4px 4px;

box-shadow: 0 1px 0 #666666 inset, 0 1px 0#333333;

color: #FFFFFF;

cursor: pointer;

font-family: 微软雅黑;

font-size: 14px;

height: 35px;

padding: 0;

text-align: center;

width: 125px;

}

Html:

<divclass="MaskPanel"></div>

<divclass="MaskContent" style="margin-left: -131px;">

    <sectionclass="masksection">

        <p class="b-Tel"style="text-align: center;"></p>

        <div class="M-sure"style="text-align: center;">

            <inputοnclick="closeMask();" type="button"class="inputFour" value="我知道了"style="display: none;" />

        </div>

    </section>

</div>

<divid="LoadingDiv" class="LoadingStyle">

    <img class="LoadingStyle"alt="" src="@MIO2OConfig.PublicResourceAddress/Images/Loading.gif">

</div>

Js:

var needDir;

functionshowWaitingMask(errorMsg, needDire) {

        var panel = $(".MaskPanel");

        var content =$(".MaskContent");

        if (errorMsg) {

           content.find("P").text(errorMsg);

           content.find("input[type=button]").show();

        } else {

           content.find("input[type=button]").hide();

        }

        needDir = needDire;

        panel.css("height",document.body.scrollHeight);

        panel.css("width", document.body.scrollWidth);

        panel.show();

        content.show();

    }

 

    function closeMask() {

        $(".MaskPanel").hide();

        $(".MaskContent").hide();

        @*if (needDir == "1") {

            if('@ViewData["Category"]' == "Tour") {

                window.location ='@Url.Action("Index", "OrderListForTour")';

            }

            else {

                var paras1 ="?Category=" + '@ViewData["Category"]';

                window.location ='@Url.Action("Index", "OrderList")' + paras1;

            }

        }*@

    }

2.      弹出层2

Css: #allin { top: 0; }

Html<divid="allin"></div>

js

function submit() {

        //var allin = $("#allin");

        //var titleDiv1 = $("#titleDiv1");

        //allin.css("height", window.innerHeight);

        //allin.css("width", document.body.scrollWidth);

        //allin.show();

        //titleDiv1.show();

       alert("OK");

    }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值