Get an Address Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Address


The Address object represents an HTML <address> element.

You can access an <address> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<address id="myAdr">
Main Street<br>
Box 999, WA<br>
USA/*from  ww w. ja v  a 2 m*/

<button onclick="myFunction()">Test</button>

function myFunction() {
    var x = document.getElementById("myAdr");
    console.log(x); = "red";


Related Tutorials