user784637
user784637

Reputation: 16152

Where can I find a list of all methods of javascript objects?

I just learned that alert() is a method of the window object. I also just learned that getElementById() is a method of the document object.

Is there a place where I can find documentation as to what methods belong to certain objects?

Upvotes: 4

Views: 5702

Answers (3)

Cameron
Cameron

Reputation: 98856

Try the Mozilla Developer Network documentation. It's quite good.

For example, you can find documentation on the both window object and the document.getElementById() method.

For a quick sandbox to try stuff out, you could try jsFiddle, or even just the JS console in Google Chrome (ctrl+shift+j).

Upvotes: 4

for any object, like window for example, you can do something like:

for(var prop in window){
   console.log(prop);
   console.debug(window[prop]);
}

log will tell you the name of the property and debug will show you the details

Upvotes: 2

Mantisimo
Mantisimo

Reputation: 4283

Try this place http://krook.org/jsdom/

Also: I'd suggest downloading Firebug addon for firefox. Use the DOM tab and you'll be able to browse which methods live where in the browser.

Upvotes: 1

Related Questions