JavaScript Reference/Javascript Properties/title stylesheet

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

"title" Example

   <source lang="javascript">
   

<html> <body> <style id="yourStyleSheet"> .body { font-family:verdana; color:blue } </style> <script language="JavaScript">

   document.getElementById("yourStyleSheet").title = "This is my internal style sheet";
   alert(document.styleSheets[0].title);

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


     </source>
   
  


"title" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |stylesheet | +----------------+--------------------------------------------------------------+

     </source>
   
  


"title" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Specifies the style sheet title.

Syntax:

document.styleSheets[index].title document.all.styleID.title


     </source>