Javascript examples for DOM HTML Element:Aside
The Aside object represents an HTML <aside> element.
You can access an <aside> element by using getElementById():
<!DOCTYPE html> <html> <body> <p>This is a test. This is a test. This is a test.This is a test. This is a test. This is a test.</p> <aside id="myAside"> <h4>header</h4> <p>this is aside. this is aside. this is aside. this is aside. this is aside. this is aside. </p> </aside>//from ww w .jav a2 s . co m <button onclick="myFunction()">set the text color of the aside content to red</button> <script> function myFunction() { var x = document.getElementById("myAside"); x.style.color = "red"; x.style.border = "1px red solid"; } </script> </body> </html>