JavaScript Reference/Javascript Properties/width pre

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

"width" Example

   <source lang="javascript">
   

<html> <body>

This text is embedded within pre tags.

<script language="JavaScript">

   document.all.myPre.width = "300";

</script> </body> </html>


     </source>
   
  


"width" is applied to

   <source lang="javascript">

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

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


"width" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Set the element width.

Syntax:

document.getElementById("preID").width = value document.all.preID.width = value // IE only


</source>