Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

element.removeAttribute

removeAttribute 从指定的元素中移除一个属性 removes an attribute from the specified element.

Syntax

element.removeAttribute(
attrName) 
  • attrName

是一个存在于 element 中的属性字符串 is a string that names the attribute to be removed from element .

文档标签和贡献者

 此页面的贡献者: teoli, ziyunfei, Xiaobian
 最后编辑者: teoli,