bootstrap:modal & iframe
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的更多相关文章
- Bootstrap Modal 垂直方向加滚动条
原文链接:http://blog.csdn.net/cyh1111/article/details/52960747 背景 使用Bootstrap Modal实现用户资料修改,由于用户信息过多,默认M ...
- Bootstrap modal垂直居中
Bootstrap modal垂直居中 在网上看到有Bootstrap2的Modal dialog垂直居中问题解决方法,这种方法自己试了一下,并不能完全居中,并且窗口的大小不一样的话,每次显示的m ...
- 对bootstrap modal的简单扩展封装
对bootstrap modal的简单扩展封装 参考自:http://www.muzilei.com/archives/677 注:原文不支持bootstrap新版本,并且居中等存在问题 此段时间 ...
- bootstrap插件学习-bootstrap.modal.js
bootstrap插件学习-bootstrap.modal.js 先从bootstrap.modal.js的结构看起. function($){ var Modal = function(){} // ...
- Bootstrap modal常用参数、方法和事件
Bootstrap modal(模态窗)常用参数.方法和事件: 参数: 名称 类型 默认值 描述 Backdrop Boolean或字符串“static” True True:有背景,点击modal外 ...
- bootstrap modal 监听滚动条事件
bootstrap modal 里面使用datetimepicker时间控件,滚动时,时间控件并不会隐藏,这是一个小bug,在组里改下,当滚动条滚动时,直接隐藏这个时间控件,$("#alar ...
- Bootstrap modal模态框关闭时,combobox input下拉框仍然保留在页面上
问题描述: 当点击模态框的关闭按钮时,下拉框中的内容没有消失,而是移动到了页面左上角 分析:这个问题的定位在于是用的哪种模态框,bootstrap和easyui都可以实现模态框,但是两个方法实现的模态 ...
- bootstrap modal与select2使用冲突解决
今天发现项目使用bootstrap modal 与 jquery select2 结合时发现select2不起作用,点击select框不显示选项,查阅资料后发现是因为modal层遮挡了select2的 ...
- bootstrap modal 垂直居中对齐
bootstrap modal 垂直居中对齐 文章参考 http://www.bubuko.com/infodetail-666582.html http://v3.bootcss.com/Jav ...
随机推荐
- Alibaba, I'm interested in you.
Working for Alibaba is an aspiration for some. For other it’s the possibility of lucrative stock opt ...
- Linux环境下虚拟环境virtualenv安装和使用
virtualenv用于创建独立的Python环境,多个Python相互独立,互不影响,它能够: 1. 在没有权限的情况下安装新套件 2. 不同应用可以使用不同的套件版本 3. 套件升级不影响其他应用 ...
- MFC 对话框不显示,返回-1 原因
DoModal失败原因 1.MFC 通常对话框不显示的原因有 1 父窗口HWND无效 2 在ONINITDIALOG里用了ENDDIALOG 3 无效的对话框资源ID 4 使用没有注册的的自定义控件 ...
- CSS之CSS的三种基本的定位机制(普通流,定位,浮动)
一.普通流 普通流中元素框的位置由元素在XHTML中的位置决定.块级元素从上到下依次排列,框之间的垂直距离由框的垂直margin计算得到.行内元素在一行中水平布置. 普通流就是html文档中的元素如块 ...
- 一般程序中的session
在WebHandler中无法访问session: IRequiresSessionState必须实现这个接口(不包含任何方法的标记接口), 需要导入using System.Web.SessionSt ...
- puppeteer(五)chrome启动参数列表API
List of Chromium Command Line Switches https://peter.sh/experiments/chromium-command-line-switches/ ...
- Oracle 10g 使用REGEXP_SUBSTR 分拆字符串 (转)
SELECT l_count, REGEXP_SUBSTR('add, daddf, dsdf, asdfa, dsfasd, dsfad','[^,]+',1,l_count) AS NAME F ...
- python selenium 百度登录
from selenium import webdriver import time driver = webdriver.Chrome() driver.get("https://www. ...
- npm install --save 、--save-dev 、-D、-S 的区别
备注:<=> 意为等价于: 1.npm install <=> npm i --save <=> -S --save-dev <=> -D npm ...
- Numpy 和 Matplotlib库的学习笔记
Numpy介绍 一个用python实现的科学计算,包括:1.一个强大的N维数组对象Array:2.比较成熟的(广播)函数库:3.用于整合C/C++和Fortran代码的工具包:4.实用的线性代数.傅里 ...