JavaScript Reference/Javascript Properties/frame

Материал из Web эксперт
Перейти к: навигация, поиск

"frame" Example

   <source lang="javascript">
   

<html> <body> <script>

   function function1() {
       document.getElementById("myTable").frame = "void";
   }
   function function2() {
       document.getElementById("myTable").frame = "above";
   }
   function function3() {
       document.getElementById("myTable").frame = "below";
   }
   function function4() {
       document.getElementById("myTable").frame = "border";
   }
   function function5() {
       document.getElementById("myTable").frame = "box";
   }
   function function6() {
       document.getElementById("myTable").frame = "hsides";
   }
   function function7() {
       document.getElementById("myTable").frame = "lhs";
   }
   function function8() {
       document.getElementById("myTable").frame = "rhs";
   }
   function function9() {
       document.getElementById("myTable").frame = "vsides";
   }

</script>

Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

<input type="button" value="Frame = "above"" onClick="function2();"> <input type="button" value="Frame = "below"" onClick="function3();"> <input type="button" value="Frame = "border"" onClick="function4();"> <input type="button" value="Frame = "box"" onClick="function5();"> <input type="button" value="Frame = "hsides"" onClick="function6();"> <input type="button" value="Frame = "lhw"" onClick="function7();"> <input type="button" value="Frame = "rhs"" onClick="function8();"> <input type="button" value="Frame = "vsides"" onClick="function9();"> <input type="button" value="Frame = "void"" onClick="function1();"> </body> </html>


     </source>
   
  


"frame" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+

| Applied_To | | +----------------+--------------------------------------------------------------+ </source>

"frame" Possible Values

   <source lang="javascript">

Possible Values void, above, below, border, box, hsides, lhs, rhs, vsides.


     </source>
   
  


"frame" Syntax and Note

   <source lang="javascript">

Note: Read and write property. How is the table border rendered.

Syntax:

document.getElementById("tableID").frame = value document.all.tableID.frame = value // IE only


</source>