PHP-Fullcalendar:无法查看,页面为空
作者:互联网
我做了Basic Usage page中所说的一切,并相应地添加了CDN,但是我什至看不到基本显示.
我也尝试了jsFiddle示例.
我对此很陌生.
<html>
<head>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src=" https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/locales.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script>
<link rel="stylesheet" href=" https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css">
</head>
<script>
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
})
});
</script>
<body>
<div id="calendar"></div>
</body>
</html>
解决方法:
<html>
<head>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css">
<link rel="stylesheet" href=" https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
});
});
</script>
</head>
<body>
<div id="calendar"></div>
</body>
</html>
1)始终将脚本放在身体或头部内.
2)您的问题是您从未导入moment.js.您的代码获取locale.js,无需运行此代码.
3)另外,请检查您的浏览器控制台.您将看到无法找到moment.js的问题.
希望这可以帮助!!
标签:fullcalendar,html,php,jquery 来源: https://codeday.me/bug/20191120/2043256.html