HTML DOM Legend Object
Legend Object
The Legend object represents an HTML
Accessing the Legend Object
You can use getElementById() to access it
var x = document.getElementById("myLegend");
Try it
Creating the Legend Object
You can use the document.createElement() method to create
var x = document.createElement("LEGEND");
Try it
Legend Object Properties
| property | Description |
|---|---|
| form | Returns a reference to the form containing the legend. |
Standard properties and events
The Legend object also supports the standard property and Events.
Related Articles
HTML Reference Manual:HTML