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: 07:59 AM Dec-20-2016
  • Last Published: 2019-05-22 : 2:52 PM