<div class="htmlarea"> <textarea id="runcode43976"> </textarea> <br> <input onclick="runEx('runcode43976')" type="button" value="运行代码"><input onclick="doCopy('runcode43976')" type="button" value="复制代码"><input onclick="doSave(runcode43976)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank"> </a>[Ctrl A 모두 선택 참고: </div>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 <script language="JavaScript"> <!-- Begin function formatDate(date) { var mymonth = date.getMonth()+1; var myweekday = date.getDate(); return (mymonth + "月" + myweekday+ "日"); } function printWeek() { var now = new Date(); var nowDayOfWeek = now.getDay(); var nowDay = now.getDate(); var nowMonth = now.getMonth(); var nowYear = now.getYear(); nowYear += (nowYear < 2000) ? 1900 : 0; var weekStartDate = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek); var weekEndDate = new Date(nowYear, nowMonth, nowDay + (6 - nowDayOfWeek)); document.write("当前星期: " + formatDate(weekStartDate) + " - " + formatDate(weekEndDate)); } // End --> </script>]<script> printWeek(); </script>