Details open Property

Details Object Reference Details Object


Show additional details:

document.getElementById("myDetails").open = true;

Try it yourself »

Definition and Usage

The open property sets or returns whether additional details/information should be visible (open) to the user, or not.

This property reflects the HTML open attribute.

When set to true, the details will be visible (open) to the user.

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The open property is currently only supported in Opera, Chrome and Safari 6.


Return the open property:

Set the open property:|false

Property Values

Value Description
true|false Specifies whether additional details should be visible (open) to the user, or not
  • true - Details will be visible
  • false - Details will not be visible

Technical Details

Return Value: A Boolean, returns true if the details are visible, otherwise it returns false

More Examples


Find out if additional details are visible (open) to the user, or not:

var x = document.getElementById("myDetails").disabled;

The result of x could be:


Try it yourself »


Toggle between opening and closing the additional details:

function openDetails() {
    document.getElementById("myDetails").open = true;

function closeDetails() {
    document.getElementById("myDetails").open = false;

Try it yourself »

Details Object Reference Details Object


Color Picker