jquery背景模式弹出
问题描述:
我正在寻找jQuery模式弹出窗口应显示图像样本检查显示路由号码等..当我点击一个路由号码(?)问号时,它应该弹出一个图像,应该在右上角有关闭按钮。我看到了不同的方法,但无法找到确切的一个jquery背景模式弹出
答
退房Bootstrap Modal。点击Launch demo modal
按钮。
在<head>
请确保您包含javascript为jquery
和bootstrap.js
。您可以从bootstrap站点下载bootstrap.js
。你也可能想要包括bootstrap.css
。
一旦你的<head>
都设置好了,在你的身体上你需要添加隐藏的模态代码,你需要添加一个按钮来显示模态。按钮和模式通过id
连接在一起。
<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>
我该如何把这段代码放在jsp页面中? – user1380678
你能告诉我如何放置代码并使其可运行。我在寻找你向我展示的完美例子。 – user1380678