Javascript examples for DOM HTML Element:Details
The Details object represents an HTML <details> element.
You can access a <details> element by using getElementById():
<!DOCTYPE html> <html> <body> <details id="myDetails"> Some additional details.../* ww w .ja v a 2 s. c om*/ </details> <button onclick="myFunction()">show additional details</button> <script> function myFunction() { var x = document.getElementById("myDetails"); x.open = true; } </script> </body> </html>