创建元素
$('<标签名>')
内部插入
元素.append(参数)

$(新元素).appendTo (参数)
prepend()prependTo()类似之前的,在前面加入
外部插入,添加兄弟元素

元素.after(新元素)
新元素.insertAfter(元素)
before()
insertBefore()
提供两个方法为了方便链式操作


创建元素
$('<标签名>')
内部插入
元素.append(参数)
$(新元素).appendTo (参数)
prepend()prependTo()类似之前的,在前面加入
外部插入,添加兄弟元素
元素.after(新元素)
新元素.insertAfter(元素)
before()
insertBefore()
提供两个方法为了方便链式操作
本文标题:jQueryDOM操作
本文链接:https://www.haomeiwen.com/subject/nfcnbqtx.html
网友评论