Display message to every minute in Javascript
Posted: 22 Jan 2022, 06:54
Hello,
On eatch minute from the current hour I wanna have an message
I can not find out how to complete
this example give an messange on eatch differen minte
this example give an messange on eatch differen second
On eatch minute from the current hour I wanna have an message
I can not find out how to complete
Code: Select all
I hope to get something like this (code not working)
<script>
var day = new Date();
let hr = day.getHours();
let mn = day.getMinutes();
let se = day.getSeconds();
let st_hm = +hr.+mn;
if (st_hm == 7.40) document.write("40 <br>55555555 Geld moet Rollen")
if (st_hm == 7.41) document.write("41 <br>55555555 Geld moet Rollen")
if (st_hm == 7.42) document.write("42 <br>55555555 Geld moet Rollen")
if (st_hm == 7.43) document.write("43 <br>55555555 Geld moet Rollen")
if (st_hm == 7.44) document.write("44 <br>55555555 Geld moet Rollen")
</script>
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
day = new Date()
hr = day.getHours()
mn = day.getMinutes()
se = day.getSeconds()
if (mn == 1) document.write("<br>1 <br>")
if (mn == 2) document.write("<br>2 <br>")
if (mn == 3) document.write("<br>3 <br>")
if (mn == 4) document.write("<br>4 <br>")
if (mn == 5) document.write("<br>5 <br>")
</script>
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
day = new Date()
hr = day.getHours()
mn = day.getMinutes()
se = day.getSeconds()
if (se == 1) document.write("<br>1 Wat gaat er gebeuren ?")
if (se == 2) document.write("<br>2 Draag zorg voor voorraad")
if (se == 3) document.write("<br>3 Geld moet Rollen")
if (se == 4) document.write("4 <br> Geld moet Rollen")
if (se == 5) document.write("5 <br> Geld moet Rollen")
</script>