我尝试在MVC 4项目中将fullCalendar jquery添加到视图中。当我尝试加载页面时,没有错误,但日历没有出现在页面上。我不知道为什么它没有出现,我已经看了文档,看起来我已经涵盖了所有内容。
Here is my HTML:
@{
ViewBag.Title = "Calendar";
}
<h2>Calendar</h2>
<html>
<head>
<title>Calendar</title>
<link href="@Url.Content("~/Content/fullcalendar.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/fullcalendar.print.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("/Scripts/moment.min.js")"></script>
<script type="text/javascript" src="@Url.Content("/Scripts/jquery.min.js")"></script>
<script type="text/javascript" src="@Url.Content("/Scripts/jquery-ui.custom.min.js")"></script>
<script type="text/javascript" src="@Url.Content("/Scripts/fullcalendar.min.js")"></script>
<script type="text/javascript">
$("#calendar").fullCalendar({
});
</script>
</head>
<body>
<div id="calendar"></div>
</body>
</html>
我的CSS:
#calendar {
width: 900px;
margin: 40px auto;
}
为你想使用的库添加引用;
<link rel='stylesheet' href='fullcalendar/fullcalendar.css' />
<script src='fullcalendar/lib/jquery.min.js'></script>
<script src='fullcalendar/lib/moment.min.js'></script>
<script src='fullcalendar/fullcalendar.js'></script>
<script type='text/javascript'>