Different elements in a web document are treated as objects in JavaScript and each objects have their properties and method of their own. Using DOM, we can get the address of an HTML elements in different ways. The first way is to use the document object’s forms array property along with the element array property. To understand this, let’s consider the following HTML code: 1 2 3 4 5 6 7 8 <html> <head><title>Simple forms</title></head> <body> <form action=“”> Enter your name: <input type = “text” /> </form> </body> </html> To obtain the address of the textbox in
The post How to access DOM elements using javascript appeared first on Coding Security.
How to access DOM elements using javascript
read more
Tidak ada komentar:
Posting Komentar