您的位置:首页 > Web前端 > BootStrap

bootstrap学之模式对话框加载另一jsp页面内容

2014-03-25 15:38 232 查看
<!DOCTYPE html>
<html>
<head>
<title>评论</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">

<link rel="stylesheet" href="http://files.cnblogs.com/rubylouvre/bootstrap.css"/>
<script src="http://files.cnblogs.com/rubylouvre/jquery1.83.js" > </script>
<script src="http://files.cnblogs.com/rubylouvre/bootstrap-transition.js"></script>
<script src="http://files.cnblogs.com/rubylouvre/bootstrap-modal.js"></script>
<script src="http://files.cnblogs.com/rubylouvre/bootstrap-button.js"></script>

<script>
$(function(){
/*
$('#myModal').on('show', function () {
alert("show")
})
$('#myModal').on('shown', function () {
alert("shown")
})
$('#myModal').on('hide', function () {
alert("hide")
})
$('#myModal').on('hidden', function () {
alert("hidden")
})
*/
})

</script>
</head>
<body>

<p>动态</p>
<a href="./2.html" data-target="#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">评论</h3>
</div>
<div class="modal-body">
<p>弹出层…</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>
</body>
</html>

2.html
<html>
<head>
<title>bootstrap学习</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
</head>
<body>

<p>动态</p>

</body>
</html>

运行结果:

Close
Save changes
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: