开发者

Properties and methods array JavaScript

开发者 https://www.devze.com 2022-12-22 16:28 出处:网络
I am trying to write DOM viewer on JavaScript. How I can get all properties and methods of some element?

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开发者_StackOverflow社区 before.

Thanks, Anton


var element = document.getElementById('someElement');
for (var item in element) {
    alert(item);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消