zoukankan      html  css  js  c++  java
  • bootstrap之弹出框

      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

  • 相关阅读:
    Spring MVC(一)
    Spring-IOC总结
    IT
    Spring基础
    Maven
    Ajax笔记
    数据库和SQL语言
    JDBC
    拦截器
    文件上传
  • 原文地址:https://www.cnblogs.com/wang-min/p/10419133.html
Copyright © 2011-2022 走看看