Is there a way to select an element by innerHTML withtout using loops . Can it be done using Something like
document.querySelector('div[innerHTML="Sometext"]')
or
document.querySelector('div[textcontent="Sometext"]')
Is there a way to select an element by innerHTML withtout using loops . Can it be done using Something like
document.querySelector('div[innerHTML="Sometext"]')
or
document.querySelector('div[textcontent="Sometext"]')
I used jq "contains" to achieve this. for example if i want to get anchor tag with some inner Html then i would do something like this
$('a:contains("sometext")')