Introduction of Prototype
- It is implemented as a single file of JavaScript code, usually named prototype.js.
- The features range from programming shortcuts to major functions for dealing with XMLHttpRequest.
- Prototype also provides library functions to support classes and class-based objects.
- Unlike other JavaScript libraries like jQuery, Prototype extends the DOM
Use $() function to replace document.getElementById(). Like,
var myElement = $(’elementid’);
Every line of Prototype code has to be carefully rewritten - carefully especially because many helper functions and constructs (
$
$$
) look deceivingly similar.
No comments:
Post a Comment