JavaScript / Object / document.URL / 문서의 URL을 반환하는 속성
.URL
.URL 속성으로 문서의 URL을 가져올 수 있습니다.
문법
document.URL
예제
문서의 URL을 출력합니다.
<!doctype html> <html lang="ko"> <head> <meta charset="utf-8"> <title>JavaScript</title> <style> body { font-family: Consolas, monospace; } </style> </head> <body> <script> document.write( "<p>document.URL : " + document.URL + "</p>" ); </script> </body> </html>