views:

34

answers:

1

Hello everyone !!!

I am trying to write DOM viewer on JavaScript.

How I can get all properties and methods of some element?

When I used "attributes" array I am able to get only properties that has set before.

Thanks, Anton

+1  A: 
var element = document.getElementById('someElement');
for (var item in element) {
    alert(item);
}
Darin Dimitrov
@Darin Dimitrov..nice
jjj
Thank you Darin, one additional question how can I get item values array?
Anton
I already have found how get value: element[item]
Anton