remove
Summary
Removes one or more tokens from a DOMTokenList.
Method of dom/DOMTokenListdom/DOMTokenList
Syntax
var result = element.remove(token);
Parameters
token
- Data-type
- String
The token to remove from the DOMTokenList.
Return Value
Returns an object of type BooleanBoolean
Examples
//removes an item from an element's classList (a DOMTokenList)
function elRemItem(elid,itemrem) {
var classes = document.getElementById(elid).classList;
classes.remove(itemrem);
}
Related specifications
- W3C DOM4
- Candidate Recommendation