การสร้างเฟรม 2




attribute ของเฟรม
ตัว attribute ที่ใช้เสริมบอกลักษณะต่างๆของ frame คือ
1.โดยปกติจะดึงปรับความกว้างด้านข้างได้ โดยใช้เมาส์กดลาก แต่ถ้าไม่ต้องการให้ดึงได้ ต้องใช้ noresize เช่น
ตัวอย่าง
<html>
      <frameset cols="50%,50%">
          <frame src="http://www.google.com" noresize
          <frame src="http://www.facebook.com">
      </frameset>
</html>

ผลการแสดง
2.frameborder="yes/no"
เป็นคำสั่งที่กำหนดให้มีเส้นขอบคั่นหรือไม่มีก็ได้ ถ้าไม่ต้องการเส้นขอบก็ใช้ frameborder="no"      
เขียนได้ดังนี้
<html>
     <frameset cols="50%,50%">
         <frame src="http://www.google.com" frameborder="no">  
         <frame src="http://www.facebook.com">
     </frameset>
</html>
ผลการแสดง
3.marginheight="เลข"
คือระยะห่างข้อความกันเส้นขอบจอระหว่างด้านบนกับล่าง
เขียนได้ดังนี้


<html>
     <frameset cols="50%,50%">
         <frame src="http://www.google.com" marginheight="100"> 
         <frame src="http://vrisad.blogspot.com/">
     </frameset>
</html>

4.marginwidth="เลข"
คือการกำหนดระยะห่างข้อความระหว่างขอบจอด้านซ้ายกับข้อความ
เขียนได้ดังนี้


<html>
      <frameset cols="50%,50">
          <frame src="http://google.com" marginwidght="100"> 
          <frame src="http://www.facebook.com">
      </frameset>
</html>

scrolling="auto/yes/no"
คือตัวเลือนขึ้นเลื่อนลงเมื่อนำเมาส์ลากให้เลื่อน คั่นอยู่ระสว่างเฟรม มี 3 ชนิดคือ
   1.scrolling="yes" กำหนดให้มี scroll bar ไว้สำหรับเลื่อน
   2.scrolling="no" ไม่กำหนดให้มี scroll bar
   3.scrolling="auto" กำหนดให้เลื่อนอัดโนมัติ
browser รุ่นเก่าหรือบางรุ่นอาจไม่แสดงผลของ frame เราจะต้องบอกให้ผู้ใช้ browser นั้นโดยใช้ <noframes>ข้อความบอก</frames> หมายความว่า browser ไหนที่อ่านเฟรมได้ ข้อความจะไม่ออกมาเตือน แต่ถ้า browser ไหนอ่านเฟรมไม่ได้จะมีข้อความออกมาเตือน


เขียนได้ดังนี้


<html>
      <frameset cols="50%,50">
          <frame src="http://google.com" marginwidght="100"> 
          <frame src="http://www.facebook.com">
      </frameset>
      <noframes>ข้อความบอก</frames> 
</html>