Javascript examples for DOM HTML Element:Address
The Address object represents an HTML <address> element.
You can access an <address> element by using getElementById():
<!DOCTYPE html> <html> <body> <address id="myAdr"> Main Street<br> Box 999, WA<br> USA/*from ww w. ja v a 2 s.co m*/ </address> <button onclick="myFunction()">Test</button> <script> function myFunction() { var x = document.getElementById("myAdr"); console.log(x); x.style.color = "red"; } </script> </body> </html>