Horje
changement image js sur click Code Example
changement image js sur click
let myImage = document.querySelector('img');

myImage.onclick = function() {
    let mySrc = myImage.getAttribute('src');
    if(mySrc === 'images/firefox-icon.png') {
      myImage.setAttribute('src','images/firefox2.png');
    } else {
      myImage.setAttribute('src','images/firefox-icon.png');
    }
}




Javascript

Related
three.js cube Code Example three.js cube Code Example
email valid javascript Code Example email valid javascript Code Example
NameError:         undefined local variable or method `json' for Code Example NameError: undefined local variable or method `json' for Code Example
django csrf failed ajax case Code Example django csrf failed ajax case Code Example
synchronized function javascript Code Example synchronized function javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8