-10

Este é um projeto que tem uma descrição de um autor e a foto dele,e a cada 10 segundos,era para o autor,foto e footer serem modificados,mas não consigo fazer funcionar

Aqui está o código:

const imageEl = document.getElementById("img");
const textEl  = document.getElementById("text");
const footerEl = document.getElementById("footer")

const albert = () => {
    const myImage = new Image(140);
   myImage.src = "https://citacoes.in/media/authors/albert-einstein.jpg"
   document.imageEl.innerHTML = `${myImage}`;

   textEl.innerText = "Duas coisas são infinitas: o universo e a estupidez humana. Mas, em relação ao universo, ainda não tenho certeza absoluta."

   footerEl.innerText = "Albert E."
}


const timer = setInterval(() => {
    return albert();
}, 1000);
New contributor
Timoteo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • 2
    Please translate to English. Commented yesterday
  • Please also include a minimal reproducible example and describe the problem you are observing and what you are asking. Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.