1. Prototype Library
This is the first library to simplify document. getElementById () to $.
For example, the original var myele = document. getElementById ('id') is equivalent to var myele = $ ('id ')
In addition, $ also extends some features
For example, var eleArray = $ ('id1', 'id2', 'id3 ', and 'id4') can return an array containing four objects.
In addition to $, this function library also provides getElementsByClassName, addClassName for adding class names, removeClassName for removing class names, and so on.
2, jQuery
It is more powerful than prototype.
For example:
Document. getElementById () ==>$ ('# money ')
Document. getElementsByTagName ==>$ ('P ')
Returns the element with the same class name: $ ('. money ')
And can be derived like css: $ ("# content table. dateTable ")
The css rule analysis function provided in the jQuery library is amazing. It supports css1, css2, css3, and most of the Selection Characters in XPath.
3. DoJo Library
Obtain the element object by id: var money = Dojo. byId ('money ')
Get the element by Class Name: Dojo.html. getElementByClass ()