코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Date Method</title> </head> <body> <h1>getDay() 메소드</h1> <script> var date = new Date(); var days = ["일", "월", "화", "수", "목", "금", "토"]; document.write("오늘은 " + days[date.getDay()] + "요일입니다."); </script> </body> </html>