jQuery removeAttr() 方法
最后更新于:2022-03-26 22:51:04
jQuery removeAttr() 方法
定义和用法
removeAttr() 方法从被选元素移除一个或多个属性。
语法
$(selector).removeAttr(attribute)
参数 | 描述 |
---|---|
attribute | 必需。规定要移除的一个或多个属性。如需移除若干个属性,请使用空格分隔属性名称。 |

更多实例
从被选元素移除若干个属性
如何从被选元素移除 id 和 class 属性。