-
Difference between getElementById and getElementByTag
Please any one can tell me what is difference between getElementById and getElementByTag.
-
-
One, getElementById() is a valid javascript object method, the other is not (although a function could be written to create it as one if you wanted to). But, perhaps you mean getElementsByTagName() - that is also a valid javascript object method. The difference is that ElementById will retrieve a single element object with the unique id specified, whereas ElementsByTagName will retrieve an array of all element objects with the specified tag name.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks