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 ...
随机推荐
- layui 将后台传过来的值等价替换
<th lay-data="{field:'opentime',width:'12%' , sort: true, align:'center',templet:'#roleTpl'} ...
- 包的初识和进阶&异常处理
包 包是一种通过使用‘.模块名’来组织python模块名称空间的方式. 1. 无论是import形式还是from...import形式,凡是在导入语句中(而不是在使用时)遇到带点的,都要第一时间提高警 ...
- tensorflow 基本内容
tensorflow的结构 1.使用图(graphs)来表示计算任务 2.在被称之为会话(Session)的上下文(context)中执行图 3.使用tensor表示数据 4.通过变量(Variabl ...
- Spark架构原理
- 记录一个bootstrap惨痛的错误
记录一个bootstrap的错误,这个错误因为我删除了一个class就导致了页面上显示的错误,这是一个惨痛的教训,特此记录,提醒自己在做前端的修改时,一定要慎之又慎.如果真的要做改动,改完之后也要测一 ...
- .net中使用 道格拉斯-普特 抽希轨迹点
Douglas一Peukcer算法由D.Douglas和T.Peueker于1973年提出,简称D一P算法,是目前公认的线状要素化简经典算法.现有的线化简算法中,有相当一部分都是在该算法基础上进行改进 ...
- 2019王小的Java学习之路
文章背景身边有个非常要好的朋友王某某,因为是发小的关系,之后文章统称为王小. 大专毕业后 顺利 的被安排进了某某工厂工作,工作一段时间后,尽管工作比较轻松,却无法忍受终日的流水线生活,经过我的介绍,决 ...
- Mac截图操作,自定义快捷键
选择system preferences 下面能看到系统定义的快捷键,可以自己修改
- Java中的过滤器,拦截器,监听器---------简单易懂的介绍
过滤器: 过滤器其主要特点在于:取你需要的东西,忽视那些不需要的东西!在程序中,你希望选择中篇文章中的所有数字,你就可以针对性的挑选数字! 拦截器: 拦截器其主要特点在于:针对你不要的东西进行拦截,比 ...
- HDFS组件性能调优:数据平衡
生产系统中什么情况下会添加一个节点呢? 1 增加存储能力 disk 2 增加计算能力 cpu mem 如果增加是的是存储能力,说明存储已接近饱和或者说过段时间就会没有剩余的空间给作业来用.新加的节点存 ...