這意味着,你有舊的代碼。 $ E來自mootools 1.1x,它指的是document.getElement("selector");
以返回第一個匹配元素。你可以去:
$E = document.getElement;
希望它使它兼容或看看另一個更新的可摺疊腳本。機會是 - 這不會是唯一突破API變化。
的完整代碼爲:
/*
Function: $E
Selects a single (i.e. the first found) Element based on the selector passed in and an optional filter element.
Returns as <Element>.
Arguments:
selector - string; the css selector to match
filter - optional; a DOM element to limit the scope of the selector match; defaults to document.
Example:
>$E('a', 'myElement') //find the first anchor tag inside the DOM element with id 'myElement'
Returns:
a DOM element - the first element that matches the selector
*/
function $E(selector, filter){
return ($(filter) || document).getElement(selector);
};
waaah, 我這裏遇到了新的問題......我 實際上遵循烏爾提示搶($(過濾器)||文件).getElement(選擇) ; 但是,哇! 我得到了另一個空行值 el.elmain.getStyle('height')。toInt(); 它是無效的,通過我分享的源代碼(上面)? – gumuruh