0
我試圖在我的MVC3應用程序內部實現一個模式對話框。現在我只是擺弄它。這裏是我的代碼:Twitter Bootstrap Modals不適用於MVC3
@model AROrdering.Models.Category
@{
ViewBag.Title = "Browse";
Layout = null;
}
<html>
<head>
<title>test</title>
<link href="@Url.Content("~/Content/testbootstrap.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/testbootstrap.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/testjquery-1.9.1.js")" type="text/javascript"></script>
<script>
$(document).ready(function() {
$('#showGame').click(function() {
$('#gameModal').modal('show');
});
});
</script>
</head>
<body>
<div class="container">
<div id="gameModal" class="modal hide fade in">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>This is a Modal Heading</h3>
</div>
<div class="modal-body">
<h4>Text in a modal</h4>
<p>You can add some text here.</p>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-primary">Call to action</a>
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div>
<button id="showGame" class="btn btn-primary btn-large">Show Game Listing</button>
</div>
</body>
</html>
如果我實施應用,模態對話框的作品外一個普通的HTML頁面這個確切的HTML。但是當我移動代碼時,它不會。我使用相同的CSS和JavaScript文件。有沒有人有一個想法,當我轉向MVC3時,爲什麼會出現這種情況?