HTML DOM align 속성

정의와 사용법

align 속성은 iframe을 주변 텍스트에 따라 어떻게 정렬할지 설정하거나 반환할 수 있습니다.

문법

iframeObject.align=left|right|top|middle|bottom

예제

아래의 예제는 iframe을 주변 텍스트에 따라 오른쪽에 정렬하는 방법을 보여줍니다:

<html>
<body>
<iframe src="frame_a.htm" id="frame1"></iframe>
<p>Some text. Some text. Some text. Some text.</p>
<script type="text/javascript">
document.getElementById("frame1").align="right";
</script>
</body>
</html>