-2
YAHOO.namespace("yuibook.calendar");
//define the lauchCal function which creates the calendar
YAHOO.yuibook.calendar.launchCal = function() {
//create the calendar object, specifying the container
var myCal = new YAHOO.widget.Calendar("mycal");
//draw the calendar on screen
myCal.render();
}
//define the showCal function which shows the calendar
Var showCal = function() {
//show the calendar
myCal.show();
}
//create calendar on page load
YAHOO.util.Event.onDOMReady(YAHOO.yuibook.calendar.launchCal);
//attach listener for click event on calendar icon
YAHOO.util.Event.addListener("calico", "click", showCal);
//myCal.hide();
代碼的問題是,當我單擊圖標時,我無法顯示日曆。任何人都可以幫忙。我知道這位聽衆無法實現收聽者