Q54. 다음은 Location 객체의 메소드를 이용하여 페이지를 이동하는 예이다. 밑줄 친 부분을 채우시오. (400점)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
function movePage() {
location._________("https://www.naver.com");
}
</script>
</head>
<body>
<button onclick="movePage()">네이버로 이동</button>
</body>
</html>
- 난이도(1~10) : 4
- - 실행 결과
-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
function movePage() {
location.replace("https://www.naver.com");
}
</script>
</head>
<body>
<button onclick="movePage()">네이버로 이동</button>
</body>
</html>