日期:2014-05-16  浏览次数:20468 次

JavaScript document.write 当天时间
div style="margin-top:90px;margin-left:10px;line-height:150%;">						
						今天是
					<strong>
							<script language="JavaScript">
							today=new Date();
							var hours = today.getHours();
							var minutes = today.getMinutes();
							var seconds = today.getSeconds();
							var timeValue = "" + ((hours >12) ? hours -12 :hours); timeValue += ((minutes < 10) ? ":0" : ":") + minutes+"";
							timeValue += (hours >= 12) ? "PM" : "AM";
							function initArray(){
							this.length=initArray.arguments.length
							for(var i=0;i<this.length;i++)
							this[i+1]=initArray.arguments[i] }
							var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); document.write(" ",today.getFullYear(),"年","",today.getMonth()+1,"月","",today.getDate(),"日 ",d[today.getDay()+1] ); 
							</script>


					</strong>
						<br />
						上次登录时间为:<br />
						<strong class="point">
						<@dateFormat date="${member.lastlogintime*1000}" pattern="yyyy年MM月dd日 hh:MM:ss"/></strong><br />
					 	<!-- 您的学习卡账户余额: 0 元<br />
						您有 2 条未读信息:<a href="">点击查看</a>  -->
					</div>