狠狠爱夜夜在线影院:一个漂亮的页面日历+时钟_javascript_博客-java,j2ee,java框架,s...

来源:百度文库 编辑:偶看新闻 时间:2024/05/06 19:43:37












  SMTWTFS
  
  
  




  
  
  
  

  









Date
Time












function ShowDate(oYear,oMonth){
var oDays = new Date(oYear,oMonth,0).getDate()
var oFirstDay = 7-new Date(oYear,oMonth-1).getDay()
iCalendar.style.left = -iCalendar.offsetWidth*.07143*oFirstDay
for(i=0;i<6;i++) DateArray[i+56].style.visibility = (parseInt(i/2)+29>oDays)?'hidden':'visible'//29->31
iMonths.parentNode.firstChild.value = MonthsArray[oMonth-1];
if(BackDay>oDays) DayChoose(oDays)
}

var BackDay = 0

function DayChoose(objnum){
if(BackDay==objnum) return
for(i=1;i<=2;i++){
if(BackDay){
DateArray[BackDay*2-i].style.background = ''
DateArray[BackDay*2-i].style.color = 'black'
}
DateArray[objnum*2-i].style.background = '#0054E3'
DateArray[objnum*2-i].style.color = 'white'
}
BackDay = objnum
}


//document.write("&#",t.getMonth()+12992,"&#",t.getDate()+13279,"&#",t.getHours()+13144)
function window.onload(){
var t = new Date(NowTime)
iYears.value = t.getFullYear()
iMonths.selectedIndex = t.getMonth()+1
setTimeout("ShowDate("+t.getFullYear()+","+(t.getMonth()+1)+")",10)
DayChoose(t.getDate())
}




function HeightLight(){
var obj = event.srcElement
var obj2 = event.fromElement
if(obj.nodeName=="INPUT"){
obj.style.color = 'white'
obj.style.background = '#FFB0F8'
}
if(obj2.nodeName=="INPUT"){
obj2.style.color = ''
obj2.style.background = ''
}
}




window.onerror = ReturnTrue;
window.onhelp = ReturnFalse;
document.ondragstart = ReturnFalse;
document.oncontextmenu = ReturnFalse;
document.onselectstart = ReturnFalse;

function document.onkeydown(){
with(event){
if((keyCode&&(event.ctrlKey||altKey)) || (keyCode>=112 && keyCode<=123)){
keyCode = 0;
ReturnFalse();
}
}
}


function ReturnTrue(){
event.returnValue = true;
}

function ReturnFalse(){
event.returnValue = false;
}


'引用http://www.52515.net:8088/file.asp?fileid=3935392672713d323030372d322d3926626f61726469643d3431