|
|
最新版的prototype是1.5,查了一下有关prototype的资料,发现它的API docs整的不错,写的很清楚,那就不多
说了,依葫芦划瓢,照翻一点吧 http://www.prototypejs.org/api
第一章. Utility Methods
1. $
$() 相当于 document.getElementById()
例如以下两行相等:
Element.hide('itemId');
$('itemId').hide();
下面两行也相等:
['item1', 'item2', 'item3'].each(Element.hide);
$('item1', 'item2', 'item3').invoke('hide');
<div class="code_title">xml 代码 |
|