HTML DOM Element matches()
HTML DOM Element matches() Method
The matches() method is used to return true if an element matched a specific CSS selector. It will return false otherwise.
Syntax:-
Its syntax is:- element.matches(selectors)
Return:-
Its return is:- true if the element matches CSS Selectors else false
Further Explanation:-
Parameter | Description |
selectors | Required. One or more comma-separated CSS selectors to match. |