Bootstrap模态对话框中显示动态内容
来源:互联网 发布:淘宝店铺找谁可以装修 编辑:程序博客网 时间:2024/05/22 00:38
首先引入bootstrap的js和css,在引入对应版本的jquery;
添加按钮,点击弹出模态窗体:
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#modal" href="/Home/Test"></button>
创建模态对话框:
<div class="model fade" id="modal" tabindex="-1" role="dialog" aria_labelledby="myModelLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content"></div>
<button class="btn btn-primary btn-lg" onclick="btnSaveClick()" data-dismess="modal">确定</div>
<button class="btn btn-primary btn-lg" data-dismess="modal">取消</div>
</div>
</div>
<script>
var modelResult;
$(function(){
$("#model").on("hide.bs.modal"), function(){
//在这里应用二级窗体返回的内容
})
});
function btnSaveClick(){
modelResult = this.parent.$("#txtName").val();
}
</script>
注意:如果发现二级窗体打开一次后再打开失败,请看看href引用的界面中,是否在header中引入了css或js,这里不需要再进行引用,动态加载后会继承父窗体的js和样式
- Bootstrap模态对话框中显示动态内容
- Bootstrap模态对话框
- Bootstrap 模态对话框
- 在rials 中使用bootstrap 的modal对话框 实现一个弹窗显示多层次内容的方法
- bootstrap 内容简略显示
- Bootstrap 模态对话框居中
- 创建一个显示HTML内容的模态对话框
- 在对话框中动态显示位图
- QT 对话框中动态显示系统时间
- 对话框中显示对话框
- 如何动态改变对话框中Static Text的内容?
- 如何动态改变对话框中Static Text的内容?
- bootstrap模态对话框宽度设置
- UI-Bootstrap 模态对话框示例
- VC++中在对话框中动态显示图片
- 对话框中显示jpg,bmp图片和对话框动态显示图片
- 对话框中显示jpg,bmp图片和对话框动态显示图片
- webuploader在bootstrap模态对话框中选择文件按钮无效的问题
- 深克隆
- JSP中实现当前年份前后二十年的选择的下拉框
- EventBus3.0 使用
- Flume
- python基础:(2)第一个程序
- Bootstrap模态对话框中显示动态内容
- 9月21日云栖精选夜读:专访新浪微博黄波:千人千面,机器学习赋能用户信息流消费
- 汉诺塔问题
- remove-duplicates-from-sorted-list
- springjdbc的使用
- [RK3288][Android6.0] 调试笔记 --- 播放GIF动画卡顿问题
- 读《印象笔记超效率数位笔记术》
- python:(2)数据类型和变量
- InetAddress类的使用