- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML DOM Address Object
Use the address object to represent the <address> element. Let us see an example to create <address> −
Example
<!DOCTYPE html> <html> <body> <h2>Heading Two</h2> <p>Create address element</p> <button onclick="display()">Display</button> <script> function display() { var a = document.createElement("Address"); var node = document.createTextNode("ABC Inc, P 120, Ontario, Canada"); a.appendChild(node); document.body.appendChild(a); } </script> </body> </html>
Output
Now, click on the button to display the address −
Advertisements