코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Date Method</title> </head> <body> <h1>getDate() 메소드</h1> <script> var date = new Date(); document.write("오늘은 " + date.getMonth() + "월 " + date.getDate() + "일입니다."); // 현재 날짜를 반환함. </script> </body> </html>