dojo.NodeList.removeAttr

since:V1.4
Removed:in V1.7

Removes an attribute from a list f DOM nodes.

Introduction

NodeList.removeAttr adapts dojo.removeAttr for use with node lists by applying it to every node in the list.

See dojo.removeAttr for more details.

Usage

dojo.query(sel).removeAttr(attr);
attr
the attribute property name.

Examples

Removing an attribute

The following example removes disabled from nodes.

function remAttr(){
  dojo.query("input").removeAttr("disabled");
}
<p><input name="one" disabled="disabled" value="some text"></p>
<p><label><input name="two" type="checkbox" disabled="disabled" checked="checked" value="two">&nbsp;a checkbox</label></p>
<p><button onclick="remAttr();">Remove "disabled"</button></p>
Error in the documentation? Can’t find what you are looking for? Let us know!