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>