JavaScript Reference/Javascript Properties/rules

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

"rules" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript">

   function function1() {
       document.getElementById("myTable").rules = "all";
   }
   function function2() {
       document.getElementById("myTable").rules = "cols";
   }
   function function3() {
       document.getElementById("myTable").rules = "groups";
   }
   function function4() {
       document.getElementById("myTable").rules = "none";
   }
   function function5() {
       document.getElementById("myTable").rules = "rows";
   }

</script>

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

<input type="button" value="rules = "all"" onClick="function1();"> <input type="button" value="rules = "cols"" onClick="function2();"> <input type="button" value="rules = "groups"" onClick="function3();"> <input type="button" value="rules = "none"" onClick="function4();"> <input type="button" value="rules = "rows"" onClick="function5();"> </body> </html>


     </source>
   
  


"rules" is applied to

   <source lang="javascript">

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

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

"rules" Possible Values

   <source lang="javascript">

Possible Values all, cols, groups, none, rows.


     </source>
   
  


"rules" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets the inner borders in a table.

Syntax:

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


</source>