Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How To Use Matches() In JavaScript

let abc =			  document.getElementById("abc");
console.log(abc.matches('.myclass'));	  
/*yields true. Asks 'does this element have this selector' */
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #How #To #Use #In #JavaScript
ADD COMMENT
Topic
Name
2+9 =