jquery操作DOM元素

找到元素:①$(选择器)②$("选择器").first()/.last()/.eq()/.parent()/.children()/.find()/.siblings()/.prev()/.next()......

属性操纵:$().attr();$().val();$().prop()

双标签内容:$().html();$().text()

样式:$().css()

删除、创建:$().remove();$().empty();$().html();$("<div></div>")

动画:$().animate();.fadeIn().fadeOut().fideToggle().show().hide()

dom转jq:$(dom)

jq转dom:$("div)[0]

事件:$().事件(function())

猜你喜欢

转载自blog.csdn.net/qq_34559257/article/details/80305910