function show(ev) { 
  var element = ev.target;
  element.style.backgroundColor = "yellow";}

function addAll() {
    var item;
    var checks = document.getElementsByTagName("span"); 
for (item of checks) {
if (item.getAttribute("class") == "tdn") {
    item.addEventListener("click", show, false); }}}

window.onload = addAll;
