Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

queryselector a tag with text

var aTags = document.getElementsByTagName("a");
var searchText = "SearchingText";
var found;

for (var i = 0; i < aTags.length; i++) {
  if (aTags[i].textContent == searchText) {
    found = aTags[i];
    break;
  }
}

// Use `found`.
Comment

PREVIOUS NEXT
Code Example
Javascript :: swap key value object javascript 
Javascript :: kamus bahasa inggris 
Javascript :: react router 
Javascript :: Install react router in react app 
Javascript :: phone patter regex 
Javascript :: disable eslint specific rule 
Javascript :: map function in react 
Javascript :: redux template create react app 
Javascript :: print value in jquery 
Javascript :: node js send fcm 
Javascript :: javascript detect when number of elements change 
Javascript :: how to reverse number in javascript 
Javascript :: MongooseServerSelectionError: connect ECONNREFUSED ::1:27017 
Javascript :: reload page with parameters javascript 
Javascript :: js first letter to uppercase 
Javascript :: print object key value javascript 
Javascript :: javascript quicksort 
Javascript :: logout user firebase 
Javascript :: placeholder value javascript 
Javascript :: json.parse what does it do 
Javascript :: Both npm and yarn have created lockfiles for this application, 
Javascript :: sequelize migration add column foreign key 
Javascript :: TypeError: client.guilds.forEach is not a function 
Javascript :: inject image javascript 
Javascript :: react useeffect 
Javascript :: reverse a string without affecting special characters in javascript 
Javascript :: typeof array javascript 
Javascript :: how to use ctx on canvas js 
Javascript :: js two array combining with id 
Javascript :: add comma after every 3 digits javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =