Documentation Prolog Predicate Reference dom attr/3

attr/3

Read or update an attribute of an HTML element.

Description

attr( +htmlObject, +atom, ?term )

attr(HTMLObject, Attribute, Value) can be used both to read the attribute of an HTML element and to set it. If Value is not a ground term, it will unify with the value of Attribute of the HTML element stored in HTMLObject. If it is a ground term, it will set the value for that said attribute.

Implementation