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>