Well, I found a list of DOM elements and what they can do. JavaScript Kit lists the DOM methods that are most used by programmers. The page is rather long so they have added a search function.
Here is an example:


function test2(val) {
if (document.getElementById && document.createElement)
{
node = document.getElementById('hereweare').parentNode;
node.setAttribute('align',val);
}
else alert('Your browser doesn\'t support the Level 1 DOM');
}
$("mydiv")
, which is a Prototype function that returns a Document Object Model (DOM) Element associated with the HTML tag with id
"mydiv". That sort of concision alone is probably worth the cost of setting up Prototype. It's the equivalent of: document.getElementById("mydiv");
Another useful Prototype shortcut is $F("mySelect")
, for returning the value of an HTML form element on a web page, such as a selection list. Once you get used to Prototype's austere, Perlish syntax, you will use these shortcuts all the time. Prototype also contains numerous custom objects, methods, and extensions to built-in JavaScript objects, such as the Enumeration
and Hash
objects (which I discuss below).
Finally, Prototype also wraps the functionality of XMLHttpRequest
with its own Ajax.Request
and related objects, so that you don't have to bother with writing code for instantiating this object for various browsers."
He goes on to SHOW YOU how to set up your files for using prototype by adding certain lines of code and files. And finally he finishes up the blog with examples on how to use the library.