Latest web development tutorials

HTML DOM Details open properties

Details Object Reference Details Object

Examples

Show additional descriptive information:

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

try it"

Definition and Usage

open property is used to set or return information to the user details within the tag is displayed (open).

This property reflects the HTML open property.

When set to true, details contents of the label information will be visible.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

open property currently only supports Opera, Chrome and Safari 6 browser.


grammar

Back open properties:

detailsObject .open

Setting open properties:

detailsObject .open=true|false

Property Value

描述
true|false 规定在 HTML 页面上 details 应该是可见的。
  • true - 描述信息可见
  • false - 描述信息不可见

technical details

return value: Boolean value that, if the details visible label returns true, otherwise returns false.


More examples

Examples

See details tab additional information is visible:

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

x The output is:

true

try it"

Examples

Show or hide additional descriptive information:

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

try it"


Details Object Reference Details Object