JavaScript Reference/Javascript Properties/caption

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

"caption" Example

   <source lang="javascript">
   

<html> <body id="myBody">

Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3

<button onclick="alert(document.all.myTable.caption);">Table Caption</button> </body> </html>


     </source>
   
  


"caption" is applied to

   <source lang="javascript">

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

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

"caption" Syntax and Note

   <source lang="javascript">

Note: Read and write property (NN), and read-only (IE) property. Set the caption for table.

Syntax:

document.getElementById("tableID").caption = value document.all.tableID.caption // IE only


</source>