타겟(target) 쓰는 법 입니다.

· 10년 전 · 985

프레임을 쓰실때 생각할 것 세가지
1. frame_name.location = 'url.php';
또는 frame_name.location.href = 'url.php';
또는 frame_name.location.replace('url.php')
2. parent.frame_name.location = 'url.php';
3. opener.parent.frame_name.location = 'url.php';

새창을 열게해준 창의 주소를 바꾸고 새창을 끈다.
<script>
opener.location.href = 'url.php';
self.close();
</script>

새창을 열게해준 창의 주소를 새로고침하고 새창을 끈다
<script>
opener.location.reload();
self.close();
</script>

다른 프래임의 주소를 바꾸게 하려면
<script>
frame_name.location.href = 'url.php';
</script>

프래임 구조상 상위 프래임의 주소를 바꾸게 하려면
<script>
parent.location.href = 'url.php';
</script>

타겟이 지정된 프레임을 바꾼다.(타겟하나)
<script>
parent.target(타겟).location.href = 'url.php';
</script>

타겟이 지정된 프레임을 바꾼다.(타겟둘)
<script>
parent.target1(타겟1).location.href = 'url1.php';
parent.target2(타겟2).location.href = 'url2.php';
</script>

타겟이 지정된 프레임을 바꾼다.(타겟셋)
<script>
parent.target1(타겟1).location.href = 'url1.php';
parent.target2(타겟2).location.href = 'url2.php';
parent.target3(타겟3).location.href = 'url3.php';
</script>

타겟이 지정된 프레임두개를 클릭으로 바꾸려면
<script>
function target_frame(url1, url2)
{
parent.top_frame.location.href = url1;
parent.main_frame.location.href = url2;
}
</script>
<a href="javascript:target_frame('main_menu.html', '$go_url');"> 확인 </a>

로그인페이지 에선
<script>
parent.top_frame.location.href = '../main.html'; //main.html는 로그인페이지 보다 상위디렉토리에 있다.
 parent.main_frame.location.href = '$go_url';
</script>

로그인페이지를 새창으로 띄웠다면
<script>
opener.parent.top_frame.location.href = '../main.html';
opener.parent.main_frame.location.href = '$go_url';
self.close();
</script>

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

프로그램

+
제목 글쓴이 날짜 조회
10년 전 조회 1,084
10년 전 조회 1,069
10년 전 조회 1,062
10년 전 조회 1,112
10년 전 조회 1,083
10년 전 조회 1,159
10년 전 조회 1,144
10년 전 조회 1,120
10년 전 조회 1,267
10년 전 조회 1,251
10년 전 조회 1,043
10년 전 조회 1,352
10년 전 조회 1,708
10년 전 조회 1,149
10년 전 조회 1,401
10년 전 조회 1,357
10년 전 조회 1,216
10년 전 조회 1,167
10년 전 조회 1,123
10년 전 조회 1,250
10년 전 조회 998
10년 전 조회 1,061
10년 전 조회 1,280
10년 전 조회 1,108
10년 전 조회 1,075
10년 전 조회 1,058
10년 전 조회 1,059
10년 전 조회 1,048
10년 전 조회 1,048
10년 전 조회 1,068
10년 전 조회 1,068
10년 전 조회 1,181
10년 전 조회 1,025
10년 전 조회 1,027
10년 전 조회 1,106
10년 전 조회 1,836
10년 전 조회 1,042
10년 전 조회 1,070
10년 전 조회 1,175
10년 전 조회 1,096
10년 전 조회 1,219
10년 전 조회 1,168
10년 전 조회 1,067
10년 전 조회 1,050
10년 전 조회 1,124
10년 전 조회 1,084
10년 전 조회 1,028
10년 전 조회 992
10년 전 조회 952
10년 전 조회 986
10년 전 조회 1,388
10년 전 조회 1,001
10년 전 조회 1,123
10년 전 조회 1,064
10년 전 조회 1,263
10년 전 조회 1,107
10년 전 조회 997
10년 전 조회 1,052
10년 전 조회 1,067
10년 전 조회 1,191
10년 전 조회 1,141
10년 전 조회 999
10년 전 조회 1,059
10년 전 조회 1,995
10년 전 조회 1,862
10년 전 조회 1,423
10년 전 조회 2,004
10년 전 조회 1,066
10년 전 조회 1,526
10년 전 조회 1,735
10년 전 조회 1,270
10년 전 조회 1,250
10년 전 조회 1,155
10년 전 조회 1,005
10년 전 조회 1,194
10년 전 조회 1,169
10년 전 조회 1,711
10년 전 조회 1,122
10년 전 조회 1,168
10년 전 조회 1,182
10년 전 조회 2,085
10년 전 조회 1,212
10년 전 조회 1,101
10년 전 조회 1,203
10년 전 조회 1,236
10년 전 조회 1,328
10년 전 조회 1,117
10년 전 조회 1,188
10년 전 조회 1,522
10년 전 조회 1,478
10년 전 조회 1,464
10년 전 조회 1,017
10년 전 조회 1,110
10년 전 조회 1,094
10년 전 조회 1,027
10년 전 조회 1,266
10년 전 조회 1,030
10년 전 조회 1,353
10년 전 조회 1,007
10년 전 조회 1,322