반응형
HTML에서 다른 페이지로 이동하는 3가지 방법 |
1) HTTP headers: 를 이용한 방법
<?
$URL="jiryu.tistory.com";
header ("Location: $URL");
?>
<html>
<title></title>
<head></head>
<body>
</body>
</html>
$URL="jiryu.tistory.com";
header ("Location: $URL");
?>
<html>
<title></title>
<head></head>
<body>
</body>
</html>
2) HTML 메타 태그를 이용한 방법
<META http-equiv="refresh" content="초; url=이동할 주소">
<html>
<head>
<meta http-equiv="refresh" content="5; url=http://jiryu.tistory.com">
</head>
<body>
</body>
</html>
<head>
<meta http-equiv="refresh" content="5; url=http://jiryu.tistory.com">
</head>
<body>
</body>
</html>
3) Javascript 을 이용한 방법
<?php
$url = 'http://jiryu.tistory.com';
echo '<!--<scRIPT LANGUAGE="Javascript">';
echo 'location.href = "'.$url.'";
echo '</scRIPT>-->';
?>
$url = 'http://jiryu.tistory.com';
echo '<!--<scRIPT LANGUAGE="Javascript">';
echo 'location.href = "'.$url.'";
echo '</scRIPT>-->';
?>
반응형
'HTML/자바스크립트' 카테고리의 다른 글
레이어로 해상도에 따라 바뀌는 배너(팝업)위치 고정하기 (0) | 2011.11.12 |
---|---|
검색창에 이미지넣기 (0) | 2011.04.27 |
그림(이미지)에 마우스 오면 뜨는 작업 툴바 없애기 (0) | 2011.04.27 |
페이지 드래그 방지(무단카피 방지) (0) | 2011.04.27 |
URL 주소를 입력할때 "www" 유무 (0) | 2011.04.27 |