dojo.NodeList.removeAttr

Available:since V1.4

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

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

Examples

Removing an attribute

The following example removes disabled from nodes.

<script type="text/javascript">
  function remAttr(){
    dojo.query("input").removeAttr("disabled");
  }
</script>
<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!