ユーティリティメソッド |
|
$ |
文字列を渡すとそれを ID とする HTML 要素を返します。HTML 要素を渡すとそのまま返します。 |
|
$$ |
任意の数の CSS セレクター文字列を受け取り、指定した CSS セレクターにマッチした
拡張 DOM 要素の配列を返します。(要素の並びはドキュメント順)
|
|
$A |
|
|
$F |
Form コントロールの値を返します。input 要素なら value を、select 要素なら選択されている option の value を返します。
これは Form.Element.getValue の短縮形なので、詳細な説明はそちらを見てください。
|
|
$H |
$H メソッドは Hash オブジェクトを作成する簡単な方法です。 |
|
$R |
ObjectRange オブジェクトを作成します。 |
|
$w |
|
|
Try.these |
|
|
document.getElementByClassName |
指定したクラス名を持つ要素を返します。prototype.js バージョン 1.6
以降では $$ を使用してください。
|
Ajax |
|
Ajax オプション |
オプション | デフォルト値 |
asynchronous | true |
contentType | application/x-www-form-urlencoded |
encoding | UTF-8 |
method | POST |
parameters | '' |
postBody | None |
requestHeaders |
(object の場合属性がセットされる。array の場合は
偶数目の要素がヘッダー名、奇数目の要素が値) |
evalJS | true
application/ecmascript, application/javascript, application/x-ecmascript, application/x-javascript, text/ecmascript, text/javascript, text/x-ecmascript, or text/x-javascript
|
evalJSON | true application/json |
sanitizeJSON | false (ローカル) true (その他) |
|
|
Ajax.PeriodicalUpdater |
|
|
Ajax.Request |
Ajax 呼び出しを行います。
|
|
Ajax.Responders |
|
|
Ajax.Response |
|
|
Ajax.Updater |
|
Array |
|
clear |
|
|
clone |
|
|
compact |
|
|
each |
|
|
first |
|
|
flatten |
|
|
from |
|
|
indexOf |
|
|
inspect |
|
|
last |
|
|
reduce |
|
|
reverse |
|
|
size |
|
|
toArray |
|
|
toJSON |
|
|
uniq |
|
|
without |
|
Class |
|
addMethods |
|
|
create |
|
Date |
|
toJSON |
|
Element |
|
absolutize |
|
|
addClassName |
|
|
addMethods |
|
|
adjacent |
|
|
ancestors |
|
|
childElements |
|
|
classNames |
|
|
cleanWhitespace |
|
|
clonePosition |
|
|
cumulativeOffset |
|
|
cumulativeScrollOffset |
|
|
descendantOf |
|
|
descendants |
|
|
down |
|
|
empty |
|
|
extend |
|
|
fire |
|
|
firstDescendant |
|
|
getDimensions |
|
|
getElementsByClassName |
|
|
getElementsBySelector |
|
|
getHeight |
|
|
getOffsetParent |
|
|
getStyle |
|
|
getWidth |
|
|
hasClassName |
|
|
hide |
|
|
identify |
|
|
immediateDescendants |
|
|
insert |
|
|
inspect |
|
|
makeClipping |
|
|
makePositioned |
|
|
match |
|
|
next |
|
|
nextSiblings |
|
|
observe |
|
|
positionedOffset |
|
|
previous |
|
|
previousSiblings |
|
|
readAttribute |
|
|
recursivelyCollect |
|
|
relativize |
|
|
remove |
|
|
removeClassName |
|
|
replace |
|
|
scrollTo |
|
|
select |
|
|
setOpacity |
|
|
setStyle |
|
|
show |
|
|
siblings |
|
|
stopObserving |
|
|
toggle |
|
|
toggleClassName |
|
|
undoClipping |
|
|
undoPositioned |
|
|
up |
|
|
update |
HTML 要素の中身 (innerHTML) を更新します。input 要素の value は更新しません。 |
|
viewportOffset |
|
|
visible |
|
|
wrap |
|
|
writeAttribute |
|
Element.Methods |
|
absolutize |
| addClassName | |
| adjacent | |
| ancestors | |
| childElements | |
| classNames | |
| cleanWhitespace | |
| clonePosition | |
| cumulativeOffset | |
| cumulativeScrollOffset | |
| descendantOf | |
| descendants | |
| down | |
| empty | |
| fire | |
| firstDescendant | |
| getDimensions | |
| getElementsByClassName | |
| getElementsBySelector | |
| getHeight | |
| getOffsetParent | |
| getStyle | |
| getWidth | |
| hasClassName | |
| hide | |
| identify | |
| immediateDescendants | |
| insert | |
| inspect | |
| makeClipping | |
| makePositioned | |
| match | |
| next | |
| nextSiblings | |
| observe | |
| positionedOffset | |
| previous | |
| previousSiblings | |
| readAttribute | |
| recursivelyCollect | |
| relativize | |
| remove | |
| removeClassName | |
| replace | |
| scrollTo | |
| select | |
| setOpacity | |
| setStyle | |
| show | |
| siblings | |
| stopObserving | |
| toggle | |
| toggleClassName | |
| undoClipping | |
| undoPositioned | |
| up | |
| update | |
| viewportOffset | |
| visible | |
| wrap | |
| writeAttribute | |
Element.Methods.Simulated |
| hasAttribute | |
Enumerable |
| all | |
| any | |
| collect | |
| detect | |
| each | |
| eachSlice | |
| entries | |
| find | |
| findAll | |
| grep | |
| inGroupsOf | |
| include | |
| inject | |
| invoke | |
| map | |
| max | |
| member | |
| min | |
| partition | |
| pluck | |
| reject | |
| select | |
| size | |
| sortBy | |
| toArray | |
| zip | |
Event |
| element | |
| extend | |
| findElement | |
| isLeftClick | |
| observe | |
| pointerX | |
| pointerY | |
| stop | |
| stopObserving | |
| unloadCache | |
Form |
| disable | |
| enable | |
| findFirstElement | |
| focusFirstElement | |
| getElements | |
| getInputs | |
| request | |
| reset | |
| serialize | |
| serializeElements | |
Form.Element |
| activate | |
| clear | |
| disable | |
| enable | |
| focus | |
|
getValue |
Form コントロール (Form.Element 要素) の値を返します。input 要素なら value を、select 要素なら選択されている option の value を返します。
これの短縮形は $$ です。
|
| present | |
| select | |
| serialize | |
Function |
| argumentNames | |
| bind | |
| bindAsEventListener | |
| curry | |
| defer | |
| delay | |
| methodize | |
| wrap | |
Hash |
| clone | |
| each | |
| get | |
| inspect | |
| keys | |
| merge | |
| remove | |
| set | |
| toJSON | |
| toObject | |
| toQueryString | |
| unset | |
| update | |
| values | |
Insertion |
| After | |
| Before | |
| Bottom | |
| Top | |
Number |
| abs | |
| ceil | |
| floor | |
| round | |
| succ | |
| times | |
| toColorPart | |
| toJSON | |
| toPaddedString | |
Object |
| clone | |
| extend | |
| inspect | |
| isArray | |
| isElement | |
| isFunction | |
| isHash | |
| isNumber | |
| isString | |
| isUndefined | |
| keys | |
| toHTML | |
| toJSON | |
| toQueryString | |
| values | |
ObjectRange |
| include | |
PeriodicalExecuter |
| stop | |
Position 1.6 以降では使用しない |
| absolutize | |
| clone | |
| cumulativeOffset | |
| offsetParent | |
| overlap | |
| page | |
| positionedOffset | |
| prepare | |
| realOffset | |
| relativize | |
| within | |
| withinIncludingScrolloffsets | |
Prototype |
| K | |
| emptyFunction | |
String |
| blank | |
| camelize | |
| capitalize | |
| dasherize | |
| empty | |
| endsWith | |
| escapeHTML | |
| evalJSON | |
| evalScripts | |
| extractScripts | |
| gsub | |
| include | |
| inspect | |
| interpolate | |
| isJSON | |
| parseQuery | |
| scan | |
| startsWith | |
| strip | |
| stripScripts | |
| stripTags | |
| sub | |
| succ | |
| times | |
| toArray | |
| toJSON | |
| toQueryParams | |
| truncate | |
| underscore | |
| unescapeHTML | |
| unfilterJSON | |
Template |
|
evaluate |
Template にデータを与え、フォーマットされた文字列を取得します。 |
TimedObserver |
| Form.Element.Observer | |
| Form.Observer | |
document |
document.viewpoint |
| getDimensions | |
| getHeight | |
| getScrollOffsets | |
| getWidth | |