HTML DOM marginHeight 속성

정의 및 사용법

marginHeight 속성은 프레임 상단 및 하단의 페이지 공백을 설정하거나 반환합니다(픽셀 단위).

문법

iframeObject.marginHeight=pixels

예제

아래의 예제는 iframe 상단 및 하단의 페이지 공백을 반환합니다:

<html>
<body>
<iframe src="frame_a.htm" id="frame1" marginheight="50"></iframe>
<br />
<script type="text/javascript">
x=document.getElementById("frame1");
document.write("iframe의 상단 및 하단 마진은: ");
document.write(x.marginHeight);
</script>
</body>
</html>