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.

query("#email1").removeAttr('readonly');
 
  • Last Topic Update: 24/01/2017 09:32
  • Last Published: 7/6/2017 : 9:49 AM