當前位置:編程學習大全網 - 源碼下載 - 高分!!有沒有相關的工作日歷源碼,js或java,可以自己定制工作日與休息日~~謝!

高分!!有沒有相關的工作日歷源碼,js或java,可以自己定制工作日與休息日~~謝!

<SCRIPT LANGUAGE="JavaScript" >

function runClock() {

var today = new Date();

var display= today.toLocaleString();

if(document.layers){document.layers.liveclock.document.write(myclock)

document.layers.liveclock.document.close()

}else if(document.all)

liveclock.innerHTML=display

setTimeout("runClock()",1000)

}

<%

String userGuid = "";

if(session.getAttribute("userGUID1")!=null){

userGuid = session.getAttribute("userGUID1").toString();

}

int check = 0;

check = new DayRemindCheck().getCheck(userGuid);

if(check>0){

%>

window.open("dayRemind.jsp","每日提醒","toolbar =no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,width=500,height=300");

<%}%>

<!-- Begin

var now = new Date();

var month_array = new Array("壹月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十壹月","十二月?");

document.write("<form name=date_list><table bgcolor=silver width=250 ><tr><td width=250>");

document.write("<select name=month onchange=change_month(this.options.selectedIndex)>");

for(i=0;i<month_array.length;i++)

{

if (now.getMonth() != i)

{document.write ("<option value="+i+">"+month_array[i]);}

else

{document.write ("<option value="+i+" selected>"+month_array[i]);}

}

document.write("</select>");

document.write("</td><td>");

document.write ("<select name=year onchange=change_year(this.options[this.options.selectedIndex])>");

for(i=1950;i<3000;i++)

{

if (now.getYear() != i)

{document.write("<option value="+i+">"+i);}

else

{document.write("<option value="+i+" selected>"+i);}

}

document.write("</select></td></tr><tr><td colspan=2><center>");

document.write("<table bgcolor=white border=0 cellspacing = 0 cellpading = 0 width=252 ><tr bgcolor=gray align=center >");

document.write("<td ><font color=silver>壹</font></td><td><font color=silver>二</td><td><font color=silver>三</td><td><font color=silver>四</td><td><font color=silver>五</td><td ><font color=silver>六</td><td ><font color=silver>日</td>");

document.write("</tr><tr>");

for(j=0;j<6;j++)

{

for(i=0;i<7;i++)

{

document.write("<td align=center id=d"+i+"r"+j+" style='cursor:hand; height=10px' onclick=getDate()></td>")

}

document.write("</tr>");

}

document.write("</table>");

document.write("</center></from></td></tr></table>");

var show_date = new Date();

function set_cal(show_date)

{

begin_day = new Date (show_date.getYear(),show_date.getMonth(),1);

begin_day_date = begin_day.getDay();

end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1);

count_day = (end_day - begin_day)/1000/60/60/24;

input_table(begin_day_date,count_day);

}

set_cal(show_date);

function input_table(begin,count)

{

init();

j=0;

if (begin!=0){i=begin-1;}else{i=6}

for (c=1;c<count+1;c++)

{

colum_name = eval("d"+i+"r"+j);

if ((now.getDate() == c)&&(show_date.getMonth() == now.getMonth())&&(show_date.getYear() == now.getYear())) {colum_name.style.backgroundColor = "blue";colum_name.style.color = "white";};

colum_name.innerText = c;

i++;

if (i==7){i=0;j++;}

}

}

function init()

{

for(j=0;j<6;j++)

{

for(i=0;i<7;i++)

{

colum_name = eval("d"+i+"r"+j);

colum_name.innerText = " ";

colum_name.style.backgroundColor ="";

colum_name.style.color ="";

}

}

}

function change_month(sel_month)

{

show_date = new Date(show_date.getYear(),sel_month,1);

set_cal(show_date);

}

function change_year(sel_year)

{

sel_year = sel_year.value;

show_date = new Date(sel_year,show_date.getMonth(),1);

set_cal(show_date);

}

// End -->

</script>

  • 上一篇:SEO優化:如何分析網站的八個指標是什麽
  • 下一篇:為什麽有的網頁保存不了,出現"無法保存該網頁"
  • copyright 2024編程學習大全網