Advertisement
Guest User

hhhh

a guest
Mar 29th, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. img.onclick = function (e){
  3.     e.target.src // здесь возвращает путь 'images/..'
  4.     e.target.getAttribute('src') // возвращает путь
  5.     e.target.getAttribute('class') // возвращает 'displayed-img'
  6.     e.target.class // возвраащет undefined ?????
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement