feat(TouristAttractions): Adiciona código ao Js
This commit is contained in:
parent
2a5ffb64c3
commit
be5e962c53
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