JavaScript Reference/Javascript Properties/bgProperties

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

"bgProperties" Example

   <source lang="javascript">
   

<html> <head> <script>

   function function1() {
       document.all.myBody.bgProperties = "fixed";
   }

</script> </head> <body background="yourImage.gif" onclick="function1();" id="myBody"> </body> </html>


     </source>
   
  


"bgProperties" is applied to

   <source lang="javascript">

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

     </source>
   
  


"bgProperties" Possible Values

   <source lang="javascript">

Possible Values An empty string the default; the image scrolls with the body content fixed the image stays fixed when the body content scrolls.


     </source>
   
  


"bgProperties" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Controls scroll of the background image.

Syntax:

document.all.bodyID.bgProperties = value


     </source>