<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta charset="utf-8" />
<script src="../Content/js/jquery/jquery-2.1.1.min.js"></script>
<link href="../Content/css/bootstrap.css" rel="stylesheet" />
<script src="../Content/js/bootstrap/bootstrap.min.js"></script>
<style>
.modal-dialog {
left: -3%;
top: 150px;
}
</style>
</head>
<body>
<script type="text/javascript">
$(function () {
$("#alertmodel").click(function () {
$('#myModal').modal();
})
})
</script>
<button id="alertmodel" class="btn btn-primary btn-lg" data-toggle="modal">开始演示模态框</button>
<!-- 模态框(Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">模态框(Modal)标题</h4>
</div>
<div class="modal-body">点击关闭按钮检查事件功能。</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary">提交更改</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
</body>
</html>