| 参数 | 描述 |
|---|---|
| attribute | 必需。规定从指定元素中移除的属性。 |
定义和用法
removeAttr() 方法从被选元素中移除属性。
语法
$(selector).removeAttr(attribute)
转载自:http://www.w3school.com.cn/jquery/attributes_removeattr.asp
本文介绍如何使用 jQuery 的 removeAttr 方法来移除 HTML 元素的属性。通过示例展示了如何从 p 元素中移除 id 属性。
| 参数 | 描述 |
|---|---|
| attribute | 必需。规定从指定元素中移除的属性。 |
removeAttr() 方法从被选元素中移除属性。
$(selector).removeAttr(attribute)
转载自:http://www.w3school.com.cn/jquery/attributes_removeattr.asp

被折叠的 条评论
为什么被折叠?