我正在尝试访问特定的类名并在另一个类中单击它。我该怎么做?
例如,
var keyword = "blah";
//Add elements with this specific class name to array
for(var i = 0; i < 20; i++)
array[i] = documents.getElementsByClassName(specific string)[i].innerHTML
//Once a specific element in the array has a matching keyword get specific class name of that element and click on it
for(var j = 0; j < 20; j++)
if(array[j].match(keyword) == keyword){
//Get class name within the innerhtml and click on it