美文网首页
前端学习笔记_jQuery之DOM

前端学习笔记_jQuery之DOM

作者: 质真如渝 | 来源:发表于2016-02-15 19:55 被阅读21次

归纳一下DOM

选择

siblings()
children()
prev()
next()
prevAll()
nextAll()
parent()
parents()
parentUntil()
eq()
index()
closest()
children()
slice()
clone()
index()

属性

attr()
removeAttr()

内容

html()
text()
val()

样式

css()
addClass()
removeClass()
toggleClass()

crud

after()
insertAfter()
before()
insertBefore()
append()
appendTo()
wrap()
wrapAll()
unwrap()
wrapInner()

大小

width()
innerWidth()
outerWidth()
height()
innerHeight()
outerHeight()
获取可视区$(window).width()$(window).height()获取页面$(document).width()$(document).height()

位置

scrollTop()
scrollLeft()
offset()
position()
offsetParent()

相关文章

网友评论

      本文标题:前端学习笔记_jQuery之DOM

      本文链接:https://www.haomeiwen.com/subject/uxsihttx.html