removeAttr()

Removes the specified HTML attribute from an element or from each element in a set of elements. To add or change an attribute, use attr() (see attr()).

removeAttr(attributeName​)

attributeName

String; the name of the attribute.

Examples

This script looks up an email field in a form (which is an <input> with the ID #email1) and removes its readonly attribute.

Copy
query("#email1").removeAttr('readonly');