1.又玩日曆(有圖示的 附件:calendar.rar)
日期:附:canlendar.js
// 公共設定
//var months = new array("january","february","march","april","may","june","july","august","september","october","november","december");
document.onclick = function()
if (!document.all.calendar.contains(event.srcelement) &&
document.all.cl.style.visibility == "visible")
}var months = new array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
//var months = new array("1","2","3","4","5","6","7","8","9","10","11","12");
var daysinmonth = new array(31,28,31,30,31,30,31,31,30,31,30,31);
//var days = new array("sun","mon","tue","wed","thu","fri","sat");
var days = new array("日","一","二","三","四","五","六");
var eventobj;
//判斷是否閏年
function getdays(month, year)
var vright = vleft + vanelement.offsetwidth;
var vbottom = vtop + vanelement.offsetheight;
if (ptop < vtop && vbottom < pbottom)
else }}
}}function showhidelayers()
else
if (document.all.year.value == "") }}
function hideelement(elmid)
//document.all.cl.style.pixelleft = event.clientx;
document.all.cl.style.pixelleft = offsetleftval + eventobj.offsetleft;
//document.all.cl.style.pixeltop = event.clienty;
document.all.cl.style.pixeltop = offsettopval + eventobj.offsettop + eventobj.offsetheight;
showhidelayers('cl','','show');
//hideelement("select");
}else
}function writecalendar1(doc,***1,first1,last1,date1,***2,first2,last2,date2,ro) else
}//此函式由writecalendar構造的日曆表呼叫,程式設計師不應當直接呼叫。
function updateoptions(***)
else
for( i=1; i<=x; i++ )
date***[i-1] = new option(i,i,false,false);
if((y+1)>x)
date***[x-1].selected = true;
else date***[y].selected = true;
}function updateoptions1(***1,***2)
function daysinmonth(themon,theyear)
function checkdate(theform,syear,smonth,sday)
function checknumber(value)
return checknumber(value);
}function checkyear1(value)
day = new date();
if(value.value.length!=0&&(value.value<1901||value.value>day.getyear()+10))
return checknumber(value);
}function checkmonth(value)
return checknumber(value);
}function checkemail(value)
return true;
}function checkzipcode(value)
return checknumber(value);
}function generatedate(year,month,day)
function addoneyear()
function isdouble(str) else
if ((ch< "0") || (ch >'9'))}}
return rc;
}function stringtrim(str)
var length = str.length;
var begin;
var end;
var finish = false;
var pointer = 0;
var value;
while ((pointer < length) && (!finish))
finish = true;
begin = pointer;
break;
}if (!finish)
pointer = length - 1;
finish = false;
while ((pointer >= 0) && (! finish))
finish = true;
end = pointer;
break;
}if (! finish)
return str.substring(begin,end+1);
}function valueisempty(value)
value = stringtrim(value);
if (value == "")
return false;
}function istelephone(str)
for(var i=0; i < str.length; i++)
}if (str.length < 7)
return true;
}1.1以前的玩法
calendar.jsp原始檔見《jsp程式開發範例寶典》050
嵌入式系統學習(2)
s3c2410有四個通道的dma控制器,每個通道都有五個dma請求源 即五種不同請求方式 其中包括兩個外部請求源由引腳nxdreq0和nxdreq0接入,應答訊號引腳為nxdack0和nxdack0。s3c2410也可以直接連線外部dma控制器,匯流排請求和應答訊號引腳分別為nxbreq和nxbac...
linux 顯示系統學習
gnome gdm kde kdm xdm x display manager x server dev fb0 ptstty gvfs dridrm linux 的3d加速 客戶端程式通過xlib 和 glxlib來和xserver 通訊。客戶端程式一般不直接呼叫,而通過使用toolkit庫比如g...
PHP系統學習2
字串操作 字串擷取 substr 字串格式化printf 格式化無需echo sprintf 需要echo nl2br 可以將 n轉換成 wordwrap 單詞之類的函式目前不知道有什麼具體用途 strtolower 轉換小寫 strtoupper 轉換大寫 ucwords 首字母轉換成大寫 str...