NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
# jQuery 属性操作 - removeAttr() 方法 ## 实例 从任何 p 元素中移除 id 属性: ``` $("button").click(function(){ $("p").removeAttr("id"); }); ``` ## 定义和用法 removeAttr() 方法从被选元素中移除属性。 ### 语法 ``` $(_selector_).removeAttr(_attribute_) ``` | 参数 | 描述 | | --- | --- | | _attribute_ | 必需。规定从指定元素中移除的属性。 |