테스트 사이트 - 개발 중인 베타 버전입니다

frame에서 target=_top 사용하기

· 12년 전 · 4608 · 3
frame 문서에서 target="_top"을 사용하고 싶을때

1. 원본 프레임문서
1-1. test1_1.php ----- 프레임 상단문서
<php
echo "<script>";
echo "window.open('test2.php','_top')"; // 프레임문서를 걷어내고 다른 페이지가 뜨게 하자
echo "</script>";
?>

1-2. test1_2.php ----- 프레임 하단문서
문서1-2

1-2. test1.php ----- 프레임문서
<html>
<head>
<title>해피정닷컴 1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<frameset rows="*, 100px" frameborder="no" border="0" framespacing="0">
<frame name="main" noresize scrolling="auto" src="test1-1.php" marginwidth="0" marginheight="0" frameborder="no">
<frame name="session" scrolling="no" noresize src="test1-2.php" marginwidth="0" marginheight="0" frameborder="no" />
</frameset><noframes></noframes>


2. 연결시킬 새로운 프레임문서
2-1. test2_1.php ----- 프레임2 상단문서
문서2-1

2-2. test2_2.php ----- 프레임2 하단문서
문서2-2

2-3. test2.php ----- 프레임2
<html>
<head>
<title>해피정닷컴 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<frameset rows="*, 100px" frameborder="no" border="1" framespacing="0">
<frame name="main" noresize scrolling="auto" src="test2-1.php" marginwidth="0" marginheight="0" frameborder="no">
<frame name="session" scrolling="no" noresize src="test2-2.php" marginwidth="0" marginheight="0" frameborder="no" />
</frameset><noframes></noframes>



좋아요(추천)은 팁자료와 스킨을 만드는 힘의 원동력입니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 3개

12년 전
아직 돌아가는 구조는 이해 잘 못하지만
좋은자려 감사합니다
추천도 쾅~~여^^*
요 팁의 포인트는 이렇습니다.
프레임을 사용해서 만들어진 홈페이지에서 프레임내부 문서에서 기존 프레임의 구조를 깨고
새로운 프레임문서 또는 단독문서를 열고자 사용하려는 것이구요.
좋은 정보 고맙습니다

게시글 목록

번호 제목
32458
32438
32437
32436
32427
32416
32411
32404
32396
32377
32366
32360
32331
32322
32319
32314
32298
32297
32287
32282