Bootstrap如何弹出modal窗,并动态传值?
来源:互联网 发布:购买域名后如何备案 编辑:程序博客网 时间:2024/06/03 16:37
Let Code tell you
<div class="modal fade" id="qrcode" tabindex="-1" role="dialog" aria-labelledby="information"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"> <span>×</span> </button> <h4 class="modal-title">请扫描二维码,完成支付</h4> </div> <div class="modal-body" style="text-align: center"> <p id="message"></p> <img src="" alt="QRCode" id="scan"> </div> </div> </div></div><button id="popup" class="btn btn-primary btn-lg btn-block">我弹</button>
$(function () { $('#popup').on('click', function(){ $('#qrcode').modal('show'); }); $('#qrcode').on('show.bs.modal', function (event) { var modal = $(this); //get modal itself modal.find('.modal-body #message').text('your message'); modal.find('.modal-body #scan').attr("src", 'image src'); }); });
What does it look like
If you have any questions or any bugs are found, please feel free to contact me.
Your comments and suggestions are welcome!
阅读全文
0 0
- Bootstrap如何弹出modal窗,并动态传值?
- 扩展bootstrap的modal模态框-动态添加modal框-弹出多个modal框
- bootstrap modal弹出框
- bootstrap modal 弹出失效
- bootstrap modal 弹出其他页面
- bootstrap 模态框modal 传值问题
- Bootstrap弹出框(modal)垂直居中
- bootstrap modal弹出框的垂直居中
- Bootstrap Modal遮罩弹出层
- bootstrap中的模态框(modal,弹出层)
- bootstrap中的模态框(modal,弹出层)
- Bootstrap Modal遮罩弹出层
- 如何获取BootStrap Modal中按钮的值,How to catch value from buttons in BootStrap Modal
- bootstrap modal 在IOS9中不能弹出的问题 IOS 9 bootstrap modal ios 9 noticework
- bootstrap-如何在modal中使用collapse
- bootstrap modal插件弹出窗口如何限制最大高度,并且在内容过多时可以滚动显示
- Bootstrap 模态框(Modal)带参数传值实例
- Bootstrap modal
- WAV文件格式分析
- Android Activity管理类NoSuchElementException的bug总结
- 思维导图怎么画才会更简单的方法推荐
- [ACL2016]Pointing the Unknown Words
- ALiBABa fastjson去除JSON对象不需要的属性字段
- Bootstrap如何弹出modal窗,并动态传值?
- w7下同时安装python2.7和python3.5
- sublime运行node.js
- OpenCV2411+VS2013的配置(问题总结)
- cordova测试发现回退键不好用
- 产品研发工作思路收集
- BTree,B-Tree,B+Tree,B*Tree都是什么
- 龙果支付系统搭建与部署
- VMware12安装centos7多网卡无法识别解决办法