Answers for "find specific text javascript"

0

how to get specific word from the string javascript

var str = 'https://dev-bmm-assets.s3.ap-south-1.amazonaws.com/footage-zip%2FAMZ-SF-FSH00685.zip';
var value = str.match('%2F')[1];

alert(value); // 226885
Posted by: Guest on June-21-2021
0

find element that has certain text javascript

for (const a of document.querySelectorAll("a")) {
  if (a.textContent.includes("your search term")) {
    console.log(a.textContent)
  }
}

Or with a separate filter:

[...document.querySelectorAll("a")]
   .filter(a => a.textContent.includes("your search term"))
   .forEach(a => console.log(a.textContent))
Posted by: Guest on October-28-2021

Code answers related to "find specific text javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language