"HTML 페이지 이동"의 두 판 사이의 차이

잔글 (로봇: 분류:Javascript에서 분류:JavaScript(으)로 바꿈)
14번째 줄: 14번째 줄:
<source lang='html5'>
<source lang='html5'>
<meta http-equiv="refresh" content="0;URL='http://example.com/'">
<meta http-equiv="refresh" content="0;URL='http://example.com/'">
</source>
<source lang='html5'>
<meta http-equiv='refresh' content='0;url=/wiki'>
</source>
</source>



2014년 2월 6일 (목) 22:02 판

meta refresh, meta redirection
page redirection
HTML 페이지 즉시 이동, HTML 페이지 자동 이동, HTML 페이지 리다이렉트
웹페이지 이동
메타 리프레시, 메타 새로고침, 메타 웹페이지 이동, 메타 넘겨주기

1 방법 1 - HTML 태그

<meta http-equiv='refresh' content='0;url=이동할주소'>
→ 0초 후 이동. 즉 즉시 이동[1]
예시
<meta http-equiv="refresh" content="0;URL='http://example.com/'">
<meta http-equiv='refresh' content='0;url=/wiki'>

2 방법 2 - 자바스크립트

<script type="text/javascript">
location.href="이동할주소";
</script>

3 같이 보기

4 주석

  1. 5초 후 이동하고 싶다면 0 대신 5를 넣으면 된다.

5 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}