Develop #3
9
js.js
9
js.js
@ -3,9 +3,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
const inputFile = document.querySelector('#input__img');
|
||||
const labelInput = document.querySelector('.label-input');
|
||||
|
||||
const textSpanInput = "Imagem";
|
||||
const textLabelInput = "Imagem";
|
||||
|
||||
labelInput.innerHTML = textSpanInput;
|
||||
labelInput.innerHTML = textLabelInput;
|
||||
|
||||
inputFile.addEventListener('change', (e) => {
|
||||
const inputTarget = e.target;
|
||||
@ -25,11 +25,14 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
labelInput.appendChild(img);
|
||||
|
||||
});
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
labelInput.innerHTML = "";
|
||||
labelInput.style.border = "none";
|
||||
|
||||
|
||||
}else {
|
||||
labelInput.innerHTML = textSpanInput;
|
||||
labelInput.innerHTML = textLabelInput;
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user