首页 > 其他 > 详细

bootstrap之弹出框

时间:2019-02-22 16:38:34      阅读:200      评论:0      收藏:0      [点我收藏+]

  1.模态框的核心在于 首先声明一个 模态框,标记其位置

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

  2.将页面生成的html代码放到模态框中,我这边是在控制器中返回视图填充模态框,然后将模态框show出来即可

   //作废
    function formInvalid(id) {
        $.ajax({
            type: ‘GET‘,
            url: "/DCC/FormFile/FormInvalid?Id=" + id + "&temp=" + Date.parse(new Date()),
            success: function (res) {
                if (res.type == ‘@Constants.MessageBodyType.Error‘) {
                    $.hqmsg.showMsg({ content: res.message, msgtype: "@Constants.MessageBodyType.Error" });

                } else {
                    $("#common-modal").html(res);
                    $("#common-modal").modal("show");
                }
            }
        });
    }
 Control层:

return PartialView(model);

 

参考资料:https://www.w3cschool.cn/bootstrap/bootstrap-modal-plugin.html

bootstrap之弹出框

原文:https://www.cnblogs.com/wang-min/p/10419133.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!