2013-05-22 51 views
0

我正在寻找jQuery模式弹出窗口应显示图像样本检查显示路由号码等..当我点击一个路由号码(?)问号时,它应该弹出一个图像,应该在右上角有关闭按钮。我看到了不同的方法,但无法找到确切的一个jquery背景模式弹出

回答

1

退房Bootstrap Modal。点击Launch demo modal按钮。

<head>请确保您包含javascript为jquerybootstrap.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> 
+0

我该如何把这段代码放在jsp页面中? – user1380678

+0

你能告诉我如何放置代码并使其可运行。我在寻找你向我展示的完美例子。 – user1380678