form提交绑定到特定的iframe & form的结果在dialog上显示

form:target属性

<!-- when the form is submitted, the server response will appear in this iframe -->
<form asp-controller="****" asp-action="****" method="post" id="batchClose" target="my_iframe">
<input id="param1" type="text" name="param1" style="display:none">
<input id="param2" type="text" name="param2" style="display:none">
</form>

  

modal显示iframe

<div id="BatchCloseAccountM" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">确认账单</h5>
</div>
<div class="modal-body">
<iframe class="my_iframe" name="my_iframe" src="" frameborder="0" scrolling="no" style="height:110px;width:400px"></iframe>
</div>
<div class="modal-footer">
<button name="cancel" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>

  

绑定js事件

<script type="text/javascript">
function BatchClose_method() {
iframe_init();
$("#parm1").val(2);
$("#parm2").val(201902);
$("#batchClose").submit();
$("#BatchCloseAccountM").modal('show');
}
function iframe_init() {
$(".my_iframe").contents().find("body").html('<span style="font-size:12px;">加载中。。。 </span>');
}
jQuery(function ($) {
$("#BatchCloseAccountM").on("hidden.bs.modal", function () {
alert("页面刷新");
});
});
</script>

  

触发modal

<a ww-check-acl="~/****/****" href="javascript:void(0);" onclick="BatchClose_method()">确认账单</a>

  

bootstrap:modal & iframe的更多相关文章

  1. Bootstrap Modal 垂直方向加滚动条

    原文链接:http://blog.csdn.net/cyh1111/article/details/52960747 背景 使用Bootstrap Modal实现用户资料修改,由于用户信息过多,默认M ...

  2. Bootstrap modal垂直居中

    Bootstrap modal垂直居中   在网上看到有Bootstrap2的Modal dialog垂直居中问题解决方法,这种方法自己试了一下,并不能完全居中,并且窗口的大小不一样的话,每次显示的m ...

  3. 对bootstrap modal的简单扩展封装

    对bootstrap modal的简单扩展封装 参考自:http://www.muzilei.com/archives/677   注:原文不支持bootstrap新版本,并且居中等存在问题 此段时间 ...

  4. bootstrap插件学习-bootstrap.modal.js

    bootstrap插件学习-bootstrap.modal.js 先从bootstrap.modal.js的结构看起. function($){ var Modal = function(){} // ...

  5. Bootstrap modal常用参数、方法和事件

    Bootstrap modal(模态窗)常用参数.方法和事件: 参数: 名称 类型 默认值 描述 Backdrop Boolean或字符串“static” True True:有背景,点击modal外 ...

  6. bootstrap modal 监听滚动条事件

    bootstrap modal 里面使用datetimepicker时间控件,滚动时,时间控件并不会隐藏,这是一个小bug,在组里改下,当滚动条滚动时,直接隐藏这个时间控件,$("#alar ...

  7. Bootstrap modal模态框关闭时,combobox input下拉框仍然保留在页面上

    问题描述: 当点击模态框的关闭按钮时,下拉框中的内容没有消失,而是移动到了页面左上角 分析:这个问题的定位在于是用的哪种模态框,bootstrap和easyui都可以实现模态框,但是两个方法实现的模态 ...

  8. bootstrap modal与select2使用冲突解决

    今天发现项目使用bootstrap modal 与 jquery select2 结合时发现select2不起作用,点击select框不显示选项,查阅资料后发现是因为modal层遮挡了select2的 ...

  9. bootstrap modal 垂直居中对齐

    bootstrap modal 垂直居中对齐   文章参考 http://www.bubuko.com/infodetail-666582.html http://v3.bootcss.com/Jav ...

随机推荐

  1. shell 字符串比较 算数比较 文件条件测试

    set-group-id即set-gid -->授予了程序其所在组的访问权限 set-user-id即set-uid -->授予了程序其拥有者的访问权限而不是其使用者的访问权限 set-g ...

  2. 模拟网络状况工具——clumsy

    官网:http://jagt.github.io/clumsy/index.html 官网上的介绍已经很易懂了,所以本文只是直接翻译了官网内容. clumsy 能在 Windows 平台下人工造成不稳 ...

  3. python实现ip地址查询经纬度定位

    1.此api已经关闭 https://api.map.baidu.com/highacciploc/v1?qcip=220.181.38.113&ak=你申请的AK&extension ...

  4. 一次完整的http请求过程

    转载:https://blog.51cto.com/linux5588/1351007 当我们在浏览器的地址栏输入 www.linux178.com,然后回车,回车这一瞬间到看到页面到底发生了什么呢? ...

  5. MySQL使用root权限创建用户并授权

    MySql篇 1.下载并安装Mysql (1)下载地址 MySQL-8.0下载地址 (2)Mysql配置 1.home目录下命令行执行:vi    .bash_profile来配置MySql绝对路径 ...

  6. 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class p

    严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener]org.springframework ...

  7. 18.12.02-C语言练习:韩信点兵

    C语言练习:韩信点兵 题目说明:本题是中国经典问题,有多种解法,从数论课程角度看,是一个不定方程组,而且答案不唯一. 但这里采用程序解法,使用的是暴力破解.枚举可能的解,然后根据条件判断,满足所有条件 ...

  8. UIElementImageShot

    MemoryStream memStream = new MemoryStream(); System.Windows.Media.Imaging.RenderTargetBitmap bmp = n ...

  9. ubuntu16.04SSH无法连接

    提示错误:server responded "algorithm negotiation failed” 解决办法: 修改ssh的配置文件 /etc/ssh/sshd_config文件 在末 ...

  10. centos7 源码安装php7

    因为php安装需要编译,所以服务器应该保证gcc和g++环境的安装 1. 首先释放安装包: tar -xvzf php-7.0.5.tar.gz cd php-7.0.5 2. 接下来进行参数配置,配 ...