📜  javascript代码示例中的属性

📅  最后修改于: 2022-03-11 15:02:47.443000             🧑  作者: Mango

代码示例1
elem.hasAttribute(name) //checks for existence.
elem.getAttribute(name) //gets the value.
elem.setAttribute(name, value) //sets the value.
elem.removeAttribute(name) //removes the attribute.
elem.attributes //collection of all attributes.