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. php 数据库乱码。。。php 移动临时文件

    数据库乱码,三个位置 处理好不会乱码 第一前台,传到后台: 第二后台,传到数据库: 第三数据库,存入数据库: 详解  https://www.cnblogs.com/zhoujinyi/p/46188 ...

  2. Mac mini 使用打印机

    扫描与打印机使用: 第一步:左上角黑苹果->系统偏好设置->打印机与扫描仪->设置打印机 第二步:Launchpad -> 预览 -> 文件 -> 从扫描仪导入-& ...

  3. Android系统架构与系统源码目录

    前言 技术博客终于可以恢复正常的更新速度了,原因是我编写的进阶书籍的初稿已经完成,窃以为它将会是Android应用书籍中最有深度的一本,可以说是<Android开发艺术探索>的姊妹篇.在这 ...

  4. 【转】mysql保存图片技术决定:保存二进制文件还是只保存图片相对路径,图片放在硬盘上面?

    最近遇到上面这个问题,一开始我就果断否决了数据库保存图片的策略,主要是太蠢!事实上我的决定是正确的,我仅仅理解为mysql读写性能提高的境界,具体为什么可以提高?很模糊,知道我看到了这里: 大佬做的实 ...

  5. 【Mac】-NO.133.Mac.1 -【重置忘记macos root密码】

    Style:Mac Series:Java Since:2018-09-10 End:2018-09-10 Total Hours:1 Degree Of Diffculty:5 Degree Of ...

  6. JMeter-生成性能测试结果报告

    1.将jmeter添加至环境变量,验证环境是否配置完毕: 终端输入jmeter,如果返回如下信息并启动jmeter说明环境已配置好了 2.修改配置文件 查找“Results file configur ...

  7. Linux下利用文件描述符恢复的成功失败实验

    1.测试环境准备[oracle@redhat3 ~]$ uname -aLinux redhat3 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 ED ...

  8. JS中将json字符串转为json对象的三种方式

    第一种:利用JSON的parse方法,即jsonObj=JSON.parse(jsonStr); 第二种:jsonObj = eval('(' + jsonStr+ ')'); 第三种:比较难理解:j ...

  9. 18.12.09-C语言练习:黑洞数 / Kaprekar问题

    题目: 程序: #include <stdio.h> int main(void) { int n, a, b, c, t, A, B; printf("输入一个三位数整数:&q ...

  10. 多线程之CEvent

    最近工作中要维护一个windows模块,用到了mfc中的CEvent类.这算是很久很久以前的老朋友了吧,估计和我超过10年没见过面了,不过工作就是工作,技术上来不得半点含糊,所以还是重新认识一下这位老 ...