You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For anyone interested: This code based on previous lessons from this excellent book will also work for this Event Handler exercise. It uses the setAttribute( x, y) method instead of the image.src object/property/value pathway.
function init() {
var image = document.getElementById("zero");
image.onclick = showAnswer;
};
function showAnswer() {
var image = document.getElementById("zero").setAttribute("src", "zeroblur.jpg");
}
Activity