-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
23 lines (22 loc) · 871 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Iteration 4: Make the Canvas App Functional */
// <!--Ironman-Background,Helmet,Eyes,Faceplate -->
const imgFaceplate=document.getElementById("face-plate");
const buttonfaceplate= document.getElementById("buttonfaceplate");
buttonfaceplate.oninput=()=>{
imgFaceplate.style.fill=buttonfaceplate.value;
}
const imghelmet=document.getElementById("helmet");
const buttonhelmet=document.getElementById("buttonhelmet");
buttonhelmet.oninput=()=>{
imghelmet.style.fill=buttonhelmet.value;
}
const imgeyes=document.getElementById("eyes");
const buttoneyes=document.getElementById("buttoneyes");
buttoneyes.oninput=()=>{
imgeyes.style.fill=buttoneyes.value;
}
const imgbackground=document.getElementById("background");
const buttonbackground=document.getElementById("buttonbackground");
buttonbackground.oninput=()=>{
imgbackground.style.fill=buttonbackground.value;
}