페이지에 JavaScript 와 다른 페이지에서 리디렉션할 어떻게 해야 할까요?
window.location.replace('http://sidanmor.com');
'좋다' () 를 사용하여 대체하십시오 않기 때문에, 역사, 즉 사용자 세션 시작 페이지를 렉시한테서 won& t get a # 39 에 고정되었습니다 게 죄죠 뒤로를 버튼를 파동.
>. 누군가 링크를 클릭하면 시뮬레이션하려면 사용합니다. >. '빈다우드로카션.흐레프' >. >. '빈다우드로카션드레프리스 리디렉션하십시오 시뮬레이션하려면 http 를 사용하여'
// similar behavior as an HTTP redirect
window.location.replace("http://sidanmor.com");
// similar behavior as clicking on a link
window.location.href = "http://sidanmor.com";
예를 들면 다음과 같습니다.
document.location = "MyPage.php?action=DoThis";
그럼 내 PHP 코드 확인할지 " action"; 질의 (query) 문자열이어야 " dothis" 아웃하기로 같음;; 어떤 함수가 실행 합니다.
예를 들면 다음과 같습니다.
// Similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");
// Similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";
sub> <, 정보, [이 질문에 답변을 복제본임을] [1] 에서 복사됨 < /sub>; [1]: # 506004 https://stackoverflow.com/questions/503093/how-to-redirect-to-another-webpage/506004
조금 더 설명하란말야 질문을 할 수 있습니다.
When you say, 그 위치 변경, 대부분의 사람들에게 제안됩니다 " redirect", HTML 페이지의:
window.location = url;
When you say " 재지정합니다 function"; - it doesn& # 39, 정말 쉽게 이해할 수 없다. 함수 또는 다른 페이지로 리디렉션합니다 호출할 수 있습니다 수 있습니다. 새 페이지 로드되는지 때 리디렉션할 및 함수 호출 할 수 있습니다.