摘要: Js获取当前日期时间var myDate = new Date();myDate.getYear();//获取当前年份(2位)myDate.getFullYear();//获取完整的年份(4位,1970-????)myDate.getMonth();//获取当前月份(0-11,0代表1月)myDate.getDate();//获取当前日(1-31)myDate.getDay();//获取当前星期X(0-6,0代表星期天)myDate.getTime();//获取当前时间(从1970.1.1开始的毫秒数)myDate.getHours();//获取当前小时数(0-23)myDate.getMin 阅读全文
posted @ 2013-11-19 11:15 有时 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 页面脚本代码:aspx页面: 00:00aspx.cs代码: 只需在需要调用计时函数的事件中加入这句代码就万事俱备,只欠东风: ScriptManager.RegisterStartupScript(this, this.GetType(), "js", " var timestart = new Date(); StartCal();", true); 在需要调用重新计时函数的事件中加入这句代码就大功告成: ScriptManager.RegisterStartupScript(this, this.GetType(), "js", 阅读全文
posted @ 2013-11-19 11:11 有时 阅读(658) 评论(0) 推荐(0) 编辑