jq js 获取子元素

js

this.children[1].className=""
this.firstChild.className = ""
this.lastChild.className = ""
this.children[1].style.fontWeight="bold"

jq

$(this).siblings()[i].firstChild.className = "line"
$(this).siblings()[i].lastChild.className = "menu-item-list"
$(this).siblings()[i].firstChild.nextSibling.className="menu-parent"
$(this).css(name,value)


posted @ 2020-04-09 17:19  就想来看看  阅读(655)  评论(1编辑  收藏  举报