一、筛选类函数
ancestors、recursivelyCollect、descendants、firstDescendant、immediateDescendants、previousSiblings、nextSiblings、siblings、match、up、down、previous、next、select、adjacent。
二、增、删、改元素类函数
insert、update、remove、replace、wrap、cleanWhitespace
三、设置元素各种属性类函数
visible、toggle、hidde、show、identify、readAttribute、writeAttribute、makeClipping、undoClipping
四、样式处理类函数
classNames、hasClassName、addClassName、removeClassName、toggleClassName、getStyle、setStyle、getOpacity、setOpacity。
五、位置处理类函数
getHeight、getWidth、scrollTo、getDimensions、makePositioned、undoPositioned、cumulativeOffset、positionedOffset、absolutize、relativize、cumulativeScrollOffset、getOffsetParent、viewportOffset、clonePosition。
六、几个返回布尔型的函数
empty、descendantOf、visible
七、事件管理类
fire、observe、stopObserving
八、static函数
extend
基本上就是这么几类了。不过,关于位置类函数,只有取,没有设置的,功能不完善啊。这里面的查找类函数的用法文档中也没有尽言,关键是怎么写选择符
prototype Element学习笔记(Element篇三)
2021-05-26 21:12:51声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。 如涉及版权问题,请提交至online#300.cn邮箱联系删除。
热门文章