导航

JQuery 弹出层

Posted on 2013-09-17 10:00  杨彬Allen  阅读(166)  评论(0)    收藏  举报
//引用JQuery,以实际项目为准!

    <script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../js/jquery-ui-1.8.12.custom.min.js" type="text/javascript"></script>
    <script src="../js/jquery.blockUI.js" type="text/javascript"></script>
    <div class="grid_filter">
        <div id="dialog" title="查岗人员名单" style="display:none">
            <table cellspacing="0" rules="all" border="1" style="width:100%;border-collapse:collapse;">
                <thead>
                    <tr>
                        <th scope="col">姓名</th><th scope="col">上班时间</th><th scope="col">是否需要确认</th>
                    </tr>
                </thead>
                <tbody id="addTr"></tbody>
            </table>
        </div>
    </div>
//含母版页的加载事件,普通页面的加载事件见其他文章。
Sys.Application.add_load(function () {

    $('#dialog').dialog({
        autoOpen: false, //如果设置为true,则默认页面加载完毕后,就自动弹出对话框;相反则处理hidden状态。
        bgiframe: true, //解决ie6中遮罩层盖不住select的问题 
        width: 600,
        modal: true, //这个就是遮罩效果  
        buttons: {
            "确认": function () {
                CheckUser();
                $(this).dialog("close");
            },
            "取消": function () {
                $(this).dialog("close");
            }
        }
    });


    $('#btnCustomUM').click(function () {
        var userIds = $("#ctl00_ContentPlaceHolder1_userSel_sc2_hidden").val();


        if (userIds == "" || userIds == "undefined") {
            alert("请先选择人员");
            return;
        }
        if (CheckMonitoring()) {
            if (!confirm("正在抽查中,确认重新抽查?")) {
                return false;
            }
            else {
                mapObj.clearOverlays();
                $('#contentSlider_info').empty();
            }
        }


        BindUsers(userIds);


        $('#dialog').dialog('open');


        return false;
    });

});