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. ES6语法 Promise Iterator

    类和对象 基本定义: class Parent{ constructor(name='lmx'){ //name= 默认值 this.name=name } } let v_parent = new ...

  2. 4.hadoop的安装与配置

    1.下载hadoop-2.6.2.tar.gz. 2.复制hadoop-2.6.2.tar.gz到/usr/local/目录下. 3解压 #tar  -zxvf  hadoop-2.6.2.tar.g ...

  3. LINQ交集/并集/差集/去重

    using System.Linq; List<string> ListA = new List<string>(); List<string> ListB = n ...

  4. idea+maven下jrebel的安装破解

    链接地址:https://www.cnblogs.com/wang1024/p/7211194.html

  5. hystrix参数使用方法

    hystrix+feign+ribbon,但是可能很多人都知道hystrix还有线程隔离,信号量隔离,等等各种参数配置,在这几就记录下hystrix的参数, 一.hystrix参数使用方法 通过注解@ ...

  6. mvc framework ui component understand.

    mvc: .htm是v,   context和contex中的contextNode 是m,  view controller, custom controller ,component contro ...

  7. laravel application 容器app

    vendor/laravel/framework/src/Illuminate/Foundation/Application.php Application是laravel的核心容器,几乎处理所有东西 ...

  8. 项目遇到的小问题(关于vue-cli中js点击事件不起作用和iconfont图片下载页面css样式乱的解答)

     第一个:关于vue-cli中js点击事件不起作用 在vue的methods方法queryBtnFun()中拼接html和click操作事件的时候,发现点击事件一起未起作用: 后来发现是DOM执行顺序 ...

  9. Nginx处理请求的11个阶段(agentzh的Nginx 教程学习记录)

    Nginx 处理请求的过程一共划分为 11 个阶段,按照执行顺序依次是 post-read.server-rewrite.find-config.rewrite.post-rewrite.preacc ...

  10. css3 box-flex

    应用地址:http://www.jb51.net/css/467291.html box-flex是css3新添加的盒子模型属性,它的出现打破了我们经常使用的浮动布局,实现垂直等高.水平均分.按比例划 ...