Bootstrap多层模态框如何嵌套?

Bootstrap多层模态框如何嵌套?


蓝山帝景
浏览 1583回答 2
2回答

宝慕林4294392

使用js去弹出第二个模态框<!DOCTYPE&nbsp;html><html><head><meta charset='utf-8'><title>bootstrap模态框(modal)</title><link href="../../css/bootstrap.min.css" rel="stylesheet"><script src="../../js/jquery-2.1.1.min.js"></script><script src="../../js/bootstrap.min.js"></script><!--jquery必须是1.9.0版本以上的--><script>$(function(){$("#btn2").click(function(){$("#show2").modal("show");});})</script></head><body><div class="container "><h1&nbsp;class="page-header">bootstrap模态框(modal)</h1><button class="btn btn-primary" data-toggle='modal' data-target='#show'>登陆</button><div class="modal fade " id='show' ><div class="modal-dialog"><div class="modal-content"><button class="close" data-dismiss='modal'>×</button><h1&nbsp;class="modal-title">一层模态框</h1><div class="modal-footer"><button class="btn btn-primary" data-toggle='modal' id="btn2">再弹</button></div></div></div></div><div class="modal fade " id='show2'><div class="modal-dialog"><div class="modal-content"><button class="close" data-dismiss='modal'>×</button><h1 class="modal-title">二层模态框</h1><div class="modal-body">12312312</div><div class="modal-footer"></div></div></div></div></div></body></html>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Bootstrap