根据当前的时间怎么知道这周的星期天的时间是多少?
根据当前的时间怎么知道这周的星期天的时间是多少?
--------------------编程问答--------------------
个人想法,你可以取得当前是星期几,和当前的日期,然后在根据这两个值应该就可以求成过急得星期天的时间了.
--------------------编程问答--------------------
<script type="text/javascript" language="javascript">
var timer0 = null;
var week = new Array( "日", "一", "二", "三", "四", "五", "六" );
timer0 = setTimeout(showTime,1000);
function showTime()
{
clearTimeout(timer0);
dt = new Date();
var weekday = week[dt.getDay()];
var tp = document.getElementById("timePlace");
result = dt.toLocaleDateString()+" 星期"+weekday+" "+dt.toLocaleTimeString();
tp.innerHTML = result;
timer0 = setTimeout(showTime,1000);
}
</script>
补充:.NET技术 , ASP.NET