restructured

This commit is contained in:
Karan
2021-12-03 14:22:43 +05:30
committed by GitHub
parent 8aed204cb3
commit 4198b62759
+6 -6
View File
@@ -17,23 +17,23 @@
in1.addEventListener("change", (e) => { in1.addEventListener("change", (e) => {
console.log("change"); console.log("change");
updater(in1.value); updater(in1.value);
}) });
in1.addEventListener("blur", (e) => { in1.addEventListener("blur", (e) => {
console.log("blur"); console.log("blur");
}) });
in1.addEventListener("focus", (e) => { in1.addEventListener("focus", (e) => {
console.log("focus"); console.log("focus");
}) });
in2.addEventListener("change", (e) => { in2.addEventListener("change", (e) => {
console.log("change"); console.log("change");
updater(in2.value); updater(in2.value);
}) });
in2.addEventListener("blur", (e) => { in2.addEventListener("blur", (e) => {
console.log("blur"); console.log("blur");
}) });
in2.addEventListener("focus", (e) => { in2.addEventListener("focus", (e) => {
console.log("focus"); console.log("focus");
}) });
function updater(str) { function updater(str) {
output.textContent = str; output.textContent = str;
} }