Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get element by attribute

//find first element with "someAttr" attribute
document.querySelector('[someAttr]')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #element #attribute
ADD COMMENT
Topic
Name
2+5 =