这个这个 http://code.google.com/p/jmonthcalendar/  
这个jMonthCalendar有一个demo.html  
然后我看了看试试能不能 把他塞到我的一个SSH工程的一个页面里(见代码uniteEvent.jsp)
最后精简到只有demo.html里的元素了 还是什么反应都没有......
  
应该怎么修改才能用得上呢?
  
========================================================================
uniteEvent.jsp
========================================================================
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.smartone.sn.rtms.model.ProjectCategorie.CategorieType" %>
<%@ include file="/common/head.inc"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<link rel="stylesheet" href="../css/core.css" type="text/css" />
          
<script src="../js/jquery-1.3.min.js" type="text/javascript"></script>
<script src="../js/jMonthCalendar.js" type="text/javascript"></script>
  
  
<style type="text/css" media="screen">
     #jMonthCalendar .Meeting { background-color: #DDFFFF;}
     #jMonthCalendar .Birthday { background-color: #DD00FF;}
     #jMonthCalendar #Event_3 { background-color:#0000FF; }
</style>
      
  
<script language="javaScript">
     $().ready(function() {
         var options = {
             height: 650,
             width: 980,
             navHeight: 25,
             labelHeight: 25,
             onMonthChanging: function(dateIn) {
                 //this could be an Ajax call to the backend to get this months events
                 //var events = [     { "EventID": 7, "StartDate": new Date(2009, 1, 1), "Title": "10:00 pm - EventTitle1", "URL": "#", "Description": "This is a sample event description", "CssClass": "Birthday" },
                 //                { "EventID": 8, "StartDate": new Date(2009, 1, 2), "Title": "9:30 pm - this is a much longer title", "URL": "#", "Description": "This is a sample event description", "CssClass": "Meeting" }
                 //];
                 //$.jMonthCalendar.ReplaceEventCollection(events);
                 return true;
             },
             onEventLinkClick: function(event) {  
                 alert("event link click");
                 return true;  
             },
             onEventBlockClick: function(event) {  
                 alert("block clicked");
                 return true;  
             },
             onEventBlockOver: function(event) {
                 //alert(event.Title + " - " + event.Description);
                 return true;
             },
             onEventBlockOut: function(event) {
                 return true;
             },
             onDayLinkClick: function(date) {  
                 alert(date.toLocaleDateString());
                 return true;  
             },
             onDayCellClick: function(date) {  
                 alert(date.toLocaleDateString());
                 return true;  
             }
         };
          
          
         var events = [     { "EventID": 1, "Date": "new Date(2013, 2, 1)", "Title": "10:00 pm - EventTitle1", "URL": "#", "Description": "This is a sample event description", "CssClass": "Birthday" },
                         { "EventID": 1, "StartDateTime": new Date(2013, 2, 12), "Title": "10:00 pm - EventTitle1", "URL": "#", "Description": "This is a sample event description", "CssClass": "Birthday" },
                         { "EventID": 2, "Date": "2013-02-28T00:00:00.0000000", "Title": "9:30 pm - this is a much longer title", "URL": "#", "Description": "This is a sample event description", "CssClass": "Meeting" },
                         { "EventID": 3, "StartDateTime": new Date(2013, 2, 20), "Title": "9:30 pm - this is a much longer title", "URL": "#", "Description": "This is a sample event description", "CssClass": "Meeting" },
                         { "EventID": 4, "StartDateTime": "2013-02-14", "Title": "9:30 pm - this is a much longer title", "URL": "#", "Description": "This is a sample event description", "CssClass": "Meeting" }
         ];
              
         var newoptions = { };
         var newevents = [ ];
         //$.jMonthCalendar.Initialize(newoptions, newevents);
  
              
         $.jMonthCalendar.Initialize(options, events);
              
              
              
              
         var extraEvents = [    { "EventID": 5, "StartDateTime": new Date(2009, 3, 11), "Title": "10:00 pm - EventTitle1", "URL": "#", "Description": "This is a sample event description", "CssClass": "Birthday" },
                             { "EventID": 6, "StartDateTime": new Date(2009, 3, 20), "Title": "9:30 pm - this is a much longer title", "URL": "#", "Description": "This is a sample event description", "CssClass": "Meeting" }
         ];
              
         $("#Button").click(function() {                    
             $.jMonthCalendar.AddEvents(extraEvents);
         });
              
         $("#ChangeMonth").click(function() {
             $.jMonthCalendar.ChangeMonth(new Date(2008, 4, 7));
         });
     });
</script>
<html>
<body>
     <%@ include file="/logo.inc"%>
     <%@ include file="/link.inc"%>
  
     <center>
         <div id="jMonthCalendar"></div>
     </center>
      
</body>
</html>
======================================================================== 

解决方案 »

  1.   

    Firebug里报错
    TypeError: $(...).ready is not a function
      

  2.   

    这个是纯UI方面的问题,细心查查。比如js文件是否引用对了等。
      

  3.   


    我对JS了解实在是没有
    引用应该没问题? 我把demo.html放在同一个位置是没报错的
      

  4.   

    他不是说你写的READ()函数不是函数啊!这个SCRIPT看着蛋疼!
      

  5.   


    java没有
    Firebug有 TypeError: $(...).ready is not a function 
      

  6.   


    jquery 引用是否正确?
      

  7.   

    $().ready(function(){});这样写?还是$(document).ready(function(){});这样写?还是都行呢?
      

  8.   

    页面要求的两个js有没有?页面include外部导入的几个文件有没有?
      

  9.   

    $().ready肯定是不行的jquery的源代码方法必须要有一个参数.所以楼主这个改成$(document).ready(function(){....});或者直接$(function(){....});