I am creating a website, and I need to display different messages each time. I used <blink>
tags in HTML.
With <blink>
we can only make one text blink.
I am creating a website, and I need to display different messages each time. I used <blink>
tags in HTML.
With <blink>
we can only make one text blink.
var messages = ["OK, I admit...", "...that I only answered this...", "...because I was curious to see...", "...if it could be done in one line...", "...which apparently it can...", "...though it is silly to do so..."];
setInterval(((i =-1, m = document.getElementById("message")) => () => m.innerHTML = m.innerHTML==="" ? messages[i=(i+1)%messages.length] : "")(), 1000);
<p id="message"></p>