3.0 DOM节点操作
2016-02-18 15:58:58 0 举报
AI智能生成
jQuery知识体系-DOM节点操作
作者其他创作
大纲/内容
创建节点
插入节点
内部插入节点方法
插入内部的前面
prepend(content)方法
prepend(function(index, html) {})方法
prependTo(content)方法
插入内部的后面
append(content)方法
append(function(index, html) {})方法
appendTo(content)方法
外部插入节点方法
插入外部的前面
before(content)方法
before(function(index, html) {})方法
insertBefore(content)方法
插入外部的后面
after(content)方法
after(function(index, html) {})方法
insertAfter(content)方法
包裹节点
外层包裹
wrap(html)方法
wrap(element)方法
wrap(function(index) {})方法
unwrap()方法
wrapAll(html)方法
wrapAll(element)方法
内层包裹
wrapInner(html)方法
wrapInner(element)方法
wrapInner(function(index) {})方法
节点操作
clone()复制节点
remove()删除节点
detach()保留事件的删除节点
empty()清空节点
替换节点
replaceWith()
replaceAll()
0 条评论
下一页