JavaScript Reference/Javascript Properties/noWrap

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

"noWrap" Example

   <source lang="javascript">
   

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

   function function1() {
       document.getElementById("myL").noWrap = true;
   }
   function function2() {
       document.getElementById("myL").noWrap = false;
   }

</script>

Attribute nowrap is not present in this div element"s tag.



<input type="button" value="Add noWrap = true" onclick="function1();"> <input type="button" value="Restore noWrap = false" onclick="function2();"> </body> </html>


     </source>
   
  


"noWrap" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<body>

|

| |
|

| |<td> <th> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"noWrap" Possible Values

   <source lang="javascript">

Possible Values true false (the default).


     </source>
   
  


"noWrap" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Word wrap the content? For <td>, the width property overrides noWrap. For <th>, the noWrap property overrides width.

Syntax:

document.body.noWrap = value document.getElementById("elementID").noWrap = value document.all.elementID.noWrap = value // IE only


     </source>

Источник — «http://wbex.ru/index.php?title=JavaScript_Reference/Javascript_Properties/noWrap&oldid=6927»