strange.tany,
window.addEventListener('DOMContentLoaded', function() {
[].forEach.call(document.querySelectorAll('.close'), function(item) {
item.addEventListener('click', function(event) {
item.src = item.id + 'open.png';
});
});
});
или
function task(e) {
var item = e.target;
item.src = item.id + 'open.png';
}