JavaScript Reference/Javascript Properties/compatMode

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

"compatMode" Example

   <source lang="javascript">
   

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3c.org/TR/html4/loose.dtd"> <html> <head> <script language="JavaScript">

   function function1() {
       alert(document.rupatMode);
   } 

</script> </head> <body> <button onclick ="function1();">CompatMode</button> </body> </html>


     </source>
   
  


"compatMode" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+

     </source>
   
  


"compatMode" Syntax and Note

   <source lang="javascript">

Note: Read-only property. Indicates whether or not standards-compliant mode is included in <!DOCTYPE>. document.rupatMode CSS1Compat Standards-compliant mode is included.

                           IE renders the document in compliance with the CSS1 language 
                           standards.

back-compat Standards-compliant mode is not included. Document is rendered

                           in consistent with previous versions of IE.
   

Syntax:


     </source>