forked from easysIT/doit_HTML-CSS-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocationObject.html
More file actions
40 lines (40 loc) · 947 Bytes
/
locationObject.html
File metadata and controls
40 lines (40 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>location Object</title>
<style>
#container {
width:500px;
margin:10px auto;
}
#display {
margin-top:10px;
padding:10px;
border:1px solid #222;
box-shadow: 1px 0 1px #ccc;
}
p {
font-size:1em;
}
button {
margin-top:20px;
text-align:center;
}
</style>
</head>
<body>
<div id="container">
<h2>location 객체 </h2>
<div id="display">
<script>
document.write("<p><b>location.href : </b>" + location.href + "</p>");
document.write("<p><b>location.host : </b>" + location.host + "</p>");
document.write("<p><b>location.protocol : </b>" + location.protocol + "</p>");
</script>
</div>
<button onclick="location.replace('http://www.easyspub.com')">이지스퍼블리싱 홈페이지로 이동하기</button>
</div>
</body>
</html>