正在閱讀:源碼學(xué)習(xí):一個簡單的日歷控件源碼學(xué)習(xí):一個簡單的日歷控件

2004-03-23 14:45 出處:CSDN 作者:afoskoo 責(zé)任編輯:linjixiong

 
calendar.js

   function atCalendarControl(){
  var calendar=this;
  this.calendarPad=null;
  this.prevMonth=null;
  this.nextMonth=null;
  this.prevYear=null;
  this.nextYear=null;
  this.goToday=null;
  this.calendarClose=null;
  this.calendarAbout=null;
  this.head=null;
  this.body=null;
  this.today=[];
  this.currentDate=[];
  this.sltDate;
  this.target;
  this.source;

  /************** 加入日歷底板及陰影 *********************/
  this.addCalendarPad=function(){
   document.write("<div id='divCalendarpad' style='position:absolute;top:100;left:0;width:255;height:167;display:none;'>");
   document.write("<iframe frameborder=0 height=168 width=255></iframe>");
   document.write("<div style='position:absolute;top:4;left:4;width:248;height:164;background-color:#336699;'></div>");
   document.write("</div>");
   calendar.calendarPad=document.all.divCalendarpad;
  }
  /************** 加入日歷面板 *********************/
  this.addCalendarBoard=function(){
   var BOARD=this;
   var divBoard=document.createElement("div");
   calendar.calendarPad.insertAdjacentElement("beforeEnd",divBoard);
   divBoard.style.cssText="position:absolute;top:0;left:0;width:250;height:166;border:1 outset;background-color:buttonface;";
  


 

察看評論詳細(xì)內(nèi)容 我要發(fā)表評論
作者筆名簡短內(nèi)容 發(fā)表時間
:

鍵盤也能翻頁,試試“← →”鍵

相關(guān)文章

302 Found

302 Found


Powered by Tengine
tengine