location 객체
- 자바스크립트가 실행되고 있는 현재 웹 브라우저의 주소 창에 표시된 주소 값과 관련된 내용을 다루는 객체
- 사용자 브라우저 주소 창의 url에 대한 정보(속성)의 새로고침 기능을 제공해주는 객체
location 객체의 주요 속성 및 함수
- location.href
: 브라우저 창의 url 값을 반환하는 속성
- location.reload()
: 브라우저 창에 새로 고침이 일어나게 하는 함수
=============================코드=============================
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
document.write(`url 정보 >>> ${location.href} <br/>`);
</script>
</head>
<body>
</body>
</html>
=============================실행=============================
