Prototype currently targets the following platforms:
- Microsoft Internet Explorer for Windows, version 6.0 and higher
- Mozilla Firefox 1.5 and higher
- Apple Safari 2.0.4 and higher
- Opera 9.25 and higher
- Chrome 1.0 and higher
To use Prototype in your application, download the latest release from the Prototype web site (http://prototypejs.org/download) and copy
dist/prototype.js to a suitable location. Then include it in your HTML like so:
Prototype is also available on the Google AJAX Libraries API and can be included directly from their servers like so:
Check out the documentation for further details on how to use this service.
Prototype provides a number of "convenience" methods. Most are aliases of other Prototype methods, with the exception of the
$ method, which wraps DOM nodes with additional functionality.
These utility methods all address scripting needs that are so common that their names were made as concise as can be. Hence the
The most commonly used utility method is without doubt
$(), which is, for instance, used pervasively within Prototype's code to let you pass either element IDs or actual DOM element references just about anywhere an element argument is possible. It actually goes way beyond a simple wrapper around
document.getElementById; check it out to see just how useful it is.