결과가 안나옵니다

6페이지에서
sameNewWindow = window.open('https://dreamhack.io/lecture');
console.log(sameNewWindow.location.href);
결과: https://dreamhack.io/lecture
이거 똑같이 쳐도 undefined 라고 나옵니다. 브라우저로 크롬을 쓰고 있는데 혹시 문제일까요??

#웹해킹 #보호_기법
작성자 정보
답변 1
5unkn0wn
강의 수강: 50
sameNewWindow = window.open('https://dreamhack.io/lecture');
Window {window: Window, self: Window, document: document, name: '', location: Location, …}
console.log(sameNewWindow.location.href);
https://dreamhack.io/lecture
undefined

위와 같이 URL이 출력되고 난 후에 undefined가 출력되는 것이라면 올바르게 된 것입니닷

2022.01.29. 18:19
질문에 대한 답을 알고 계신가요?
지식을 나누고 포인트를 획득해보세요.
답변하고 포인트 받기