S
Sunny
Does anyone knows, how to all the list of all the elements on the web
page using javascript.
page using javascript.
Sunny said:Does anyone knows, how to all the list of all the elements on the web
page using javascript.
document.getElementsByTagName('*')
should give all elements in the document. Assuming "web page" is an HTML
document and you want the elements in the body then you might only want
to look in the body e.g.
document.body.getElementsByTagName('*')
Sunny said:When I do:
alert(document.getElementsByTagName('*'));
It gives me "Object HTML Collection"
I want to see, all the elements name in my web page.
When I do:
alert(document.getElementsByTagName('*'));
It gives me "Object HTML Collection"
I want to see, all the elements name in my web page.
As I am creating some elements dynamically, i want the name of all the
elements present on my webpage.
And I want to do that in Firefox.
Any solution.
Sunny said:When I do:
alert(document.getElementsByTagName('*'));
It gives me "Object HTML Collection"
I want to see, all the elements name in my web page.
As I am creating some elements dynamically, i want the name of all the
elements present on my webpage.
And I want to do that in Firefox.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.