JS中的dom的屬性操做

在js中,web setAttribute(" " , " ")(能夠用來設置元素節點的屬性) getAttribute(" ")(能夠獲得元素節點的某個屬性) 也能夠直接使用 document.getElementById(「img」).src(屬性名)直接獲取屬性或者賦值屬性
相關文章
相關標籤/搜索