Egloos | Log-in


Frame 객체

* frame 객체

window 객체의 부분집합. (작은 범위의 window)

프로퍼티/메소드
frames, name, length, parent, self
blur, focus, setInterval, clearInterval, setTimeout, clearTimeout

--> 여기서 name, parent 는 프레임간의 통신에서 아주 중요하다.
parent 는 프레임명을 통해 각각 child 프레임에 접근할 수 있다.
또는 프레임 배열에서 인덱스를 사용해 접근할 수도 있다.

모든 프레임들은 parent 라는 이름으로 프레임 셋에 접근할 수 있다.
자식 프레임들 사이에는 parent.자식프레임명의 형태로 접근할 수 있다.

ex)

   main.html
   <frameset cols="300, *">
      <frame name="framea" src="framea.html" />
      <frame name="frameb" src="frameb.html" />
   </frameset>

   framea.html
   <h1>Frame A</h1>
   <p><a href="" onclick="parent.frameb.location.replace('framea.html')">
         Change Sibling</a></p>

   frameb.html
   <h1>Frame B</h1>
   <p><a href="" onclick="parent.framea.location.replace('frameb.html')">
         Change Sibling</a></p>

by 나나 | 2009/07/19 17:58 | Javascript | 트랙백

◀ 이전 페이지          다음 페이지 ▶