发布网友 发布时间:2022-04-24 01:34
共1个回答
热心网友 时间:2023-10-18 22:15
<SCRIPT language=JavaScript><!-- var welcomestring; var mydate = new Date(); var myyear = mydate.getYear(); if(myyear < 300)myyear = 1900 + myyear ; mymonth = mydate.getMonth()+1; today = mydate.getDate(); myhour = mydate.getHours(); if(myhour<6) welcomestring="凌晨好"; else if(myhour<9) welcomestring="早上好"; else if(myhour<12) welcomestring="上午好"; else if(myhour<14) welcomestring="中午好"; else if(myhour<17) welcomestring="下午好"; else if(myhour<19) welcomestring="傍晚好"; else if(myhour<22) welcomestring="晚上好"; else welcomestring="夜里好"; document.writeln(welcomestring+ "! "); //--> </SCRIPT> 今天是 <SCRIPT language=JavaScript> <!-- var today=new Date; var week=new Array(7); week[0]="天"; week[1]="一"; week[2]="二"; week[3]="三"; week[4]="四"; week[5]="五"; week[6]="六"; document.write( today.getYear() + "年" + (today.getMonth() + 1) + "月" + today.getDate() + "日" +"  "+ "星期" + week[today.getDay()]); // --></SCRIPT>热心网友 时间:2023-10-18 22:15
<SCRIPT language=JavaScript><!-- var welcomestring; var mydate = new Date(); var myyear = mydate.getYear(); if(myyear < 300)myyear = 1900 + myyear ; mymonth = mydate.getMonth()+1; today = mydate.getDate(); myhour = mydate.getHours(); if(myhour<6) welcomestring="凌晨好"; else if(myhour<9) welcomestring="早上好"; else if(myhour<12) welcomestring="上午好"; else if(myhour<14) welcomestring="中午好"; else if(myhour<17) welcomestring="下午好"; else if(myhour<19) welcomestring="傍晚好"; else if(myhour<22) welcomestring="晚上好"; else welcomestring="夜里好"; document.writeln(welcomestring+ "! "); //--> </SCRIPT> 今天是 <SCRIPT language=JavaScript> <!-- var today=new Date; var week=new Array(7); week[0]="天"; week[1]="一"; week[2]="二"; week[3]="三"; week[4]="四"; week[5]="五"; week[6]="六"; document.write( today.getYear() + "年" + (today.getMonth() + 1) + "月" + today.getDate() + "日" +"  "+ "星期" + week[today.getDay()]); // --></SCRIPT>