function findElement (tagname, text) {
  var els = document.body.getElementsByTagName(tagname)
  for (var i = 0; i < els.length; i++) {
    if (els[i].innerText === text) return els[i]
  }
  return null
}
// Find an element with a certain tag containing a certain text.
Find an element with a certain tag containing a certain text.
Find an element with a certain tag containing a certain text .
function findElement (tagname, text) {
  var els = document.body.getElementsByTagName(tagname)
  for (var i = 0; i < els.length; i++) {
    if (els[i].innerText === text) return els[i]
  }
  return null
}
function findElement ( tagname , text ) { var els = document . body . getElementsByTagName ( tagname ) for ( var i = 0 ; i < els . length ; i ++ ) { if ( els [ i ] . innerText === text ) return els [ i ] } return null }
Find an element with a certain tag containing a certain text.
Find an element with a certain tag containing a certain text .