开发者

List DOM Documents attributes and methods using Javascript

开发者 https://www.devze.com 2023-01-03 10:02 出处:网络
Just wondering if it\'s possible to print and list all methods and attributes available to the DOM docu开发者_运维百科ment itself using Javascript?

Just wondering if it's possible to print and list all methods and attributes available to the DOM docu开发者_运维百科ment itself using Javascript?

So I would get something like so:

Document.doctype Document.implementation Document.documentElement Document.createElement Document.createDocumentFragment Document.createTextNode Document.createComment Document.createProcessingInstruction etc... etc...

I want to do this to test on different browsers and not have to wade through mountains technical documents from each vendor to get accurate information.


You could use:

for (var l in document.body){
  console.log("document."+l+":"+document.body[l]);
}
0

精彩评论

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