jquery - 关于实现的完整日历问题

标签 jquery html

我在实现 FullCalendar 时遇到问题... 而且我想,我在 http://arshaw.com/fullcalendar/docs/usage/ 做了所有关于“基本用法”主题的事情。 为什么那段代码没有出现在我的 .html 上?

<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>
        Callendar Test
    </title>
    <link rel='stylesheet' type='text/css' href='fullcalendar.css' />

    <script type="text/javascript" src="jquery.js"></script>

    <script type="text/javascript" src='fullcalendar.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>

有什么解决办法吗?

P.S.:我下载了 Jquery 文件(版本 1.x)并将其放在与我的 HTML 页面相同的文件中。

错误:

Unknown property 'zoom'.  Declaration dropped. fullcalendar.css:107
18:50:38.058 Expected 'none' or URL but found 'alpha('.  Error in parsing value for              'filter'.  Declaration dropped. fullcalendar.css:133
18:50:38.058 Error in parsing value for 'background-image'.  Declaration dropped. fullcalendar.css:213
18:50:38.058 Error in parsing value for 'background-image'.  Declaration dropped. fullcalendar.css:214
18:50:38.058 Error in parsing value for 'background-image'.  Declaration dropped. fullcalendar.css:215
18:50:38.058 Expected 'none' or URL but found 'alpha('.  Error in parsing value for 'filter'.  Declaration dropped. fullcalendar.css:255
18:50:38.058 Expected 'none' or URL but found 'alpha('.  Error in parsing value for 'filter'.  Declaration dropped. fullcalendar.css:414
18:50:38.059 Expected declaration but found '*'.  Skipped to next declaration. fullcalendar.css:532
18:50:38.059 Expected 'none' or URL but found 'alpha('.  Error in parsing value for 'filter'.  Declaration dropped. fullcalendar.css:575
18:50:38.059 Error in parsing value for 'display'.  Declaration dropped. fullcalendar.css:580
18:50:38.092 ReferenceError: moment is not defined fullcalendar.js:12
18:50:38.094 The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. FullCalendar.html
18:50:38.116 TypeError: $(...).fullCalendar is not a function

这是我的目录:

enter image description here

最佳答案

以防万一其他人通过 Google 找到此主题并遇到同样的问题: 如果您正在使用 FullCalendar 的托管库,您必须在 之前包含 moment.js(托管库似乎不可用,因此您必须下载它) em> 你包含了 fullcalendar.js 文件。例如:

<script type="text/javascript" src="scripts/moment.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.1/fullcalendar.min.js"></script>

FullCalendar 显然在实例化之前就已经引用了 Moment 对象。

希望能帮到别人。

关于jquery - 关于实现的完整日历问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21367623/

相关文章:

javascript - 如何使用隐藏在 jquery 中的输入类型找到最接近的图像?

javascript - 如何在 jQuery 中正确地限定变量的范围?

python - flask 张贴到同一页

html - 如何正确地将我的 HTML 元素包含在其父 View 中?

javascript - 在大量元素上添加事件监听器的最有效方法是什么?

jquery - 暂停和播放谷歌地图标记动画

javascript - JavaScript 中 {0} 的含义是什么

javascript - 移动网络应用 : Using same set of images in multiple resolution devices

javascript - 如何定位包含JQuery中所有子元素的div id

html - 响应式表格仅适用于 Firefox