JavaScript Reference/Javascript Properties/abbr

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

"abbr" Example

   <source lang="javascript">
   

<html> <head> <script language="JavaScript"> function function1() {

   document.all.myTableHeader.abbr = "Abbreviation";

} </script> </head> <body onLoad="function1();">

This is the table heading
Cell 1 content Cell 2 content
Cell 3 content Cell 4 content

</body></html>


     </source>
   
  


"abbr" is applied to

   <source lang="javascript">

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

     </source>
   
  


"abbr" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Set an abbreviated element text.

Syntax:

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


     </source>