/

HTML / CSS / JavaScript Tutorial

JavaScript table object method: createCaption()

[this page | pdf | back links]

The createCaption() method of the JavaScript DOM object corresponding to the HTML <table> element creates an empty <caption> element and adds it to the table. If a <caption> element already exists in the table then it returns the existing one, without creating a new one.

 

It has the following syntax with no parameters:

 

object.createCaption()

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile