jQuery API 返回首页目录 | jQuery API 中英文对照版
removeAttr
removeAttr(name)

从每一个匹配的元素中删除一个属性。

返回值:jQuery

参数:

  • name (String): 要删除的属性名
 

示例:

$("input").removeAttr("disabled")

HTML 代码:

<input disabled="disabled"/>

结果:

<input/>

 
removeAttr( name )

Remove an attribute from each of the matched elements.

Return value: jQuery
Parameters:

  • name (String): The name of the attribute to remove.
 

Example:

 $("input").removeAttr("disabled")  
Before:
 <input disabled="disabled"/>  
Result:
 <input/>  
相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog