<!DOCTYPE HTML > < HTML LANG = "EN" > < 頭> < メタ文字コード= "UTF-8" > < メタ名= "ビューポート" コンテンツ= "幅=装置幅、初期の規模= 1.0" > < メタHTTP -equiv = "X-UA-互換" コンテンツ= "IE =縁" > < タイトル>日付对象设置セット</ タイトル> </ ヘッド> < ボディ> < 今日= 新しい新しいA日付(); VARの週= [ " 日付" 、" 1 " 、" 2 " 、" 3 " 、" 4 " 、" 5 " 、" 6 " ]; // today.setFullYear(2222); /年/セット2222 // のdocument.write(today.getFullYear()+ "<br />"); // 2222 // today.setMonth(13); // 13に月設定 // のdocument.write(今日.getMonth()+ "<br />" )。// 1、月に12以上の来年後に自動的に入ります //document.write(today.getFullYear()+ "<br /> "); // 2223年、 13月上記の設定のために、追加の年の間、 //は、来年のために今日取得は週です // today.setFullYear(今日.getFullYear()+ 1); //年の今日は+1取得 // のdocument.write(週間[today.getDay()]); 1年の出力の後に//時間を // 追加の時間を取得 するvar 年= today.getFullYear(); VARの月= today.getMonth()+ 1。; VARのDATE = today.getDate(); // 時間、分、秒............省略 VAR ティム= 新しい新しいA日付(年- 1。 、月、 DATE + 50 ); //昨年:今年-1; 50日:今日50; document.writeを(" 今日の最後の50日には、次のとおりです。" + tim.getFullYear()+ " の" + tim.getMonth()+ " 月" + tim.getDate ()+ " 日の週" + 週[tim.getDay()]); </ スクリプト> </ ボディ> </ HTML >