Question
JavaScript/CSS/HTML add codes to achieve highlight TimeZone CITY label(s) Given existing codes, add new codes to achieve auto hightlight CITY label(s) with background RED color,
JavaScript/CSS/HTML add codes to achieve highlight TimeZone CITY label(s)
Given existing codes, add new codes to achieve auto hightlight CITY label(s) with background RED color, when the local time of that city or cities is between 900-1800.
var hr = gmtTime.getHours() + zone var min = gmtTime.getMinutes() var sec = gmtTime.getSeconds()
if (hr >= 24){ hr = hr-24 day -= -1 } if (hr monthDays[month]){ day = 1 if(month == 11){ month = 0 year -= -1 } else{ month -= -1 } }
if (dst == 1){ hr -= -1 if (hr >= 24){ hr = hr-24 day -= -1 } if (hr monthDays[month]){ day = 1 if(month == 11){ month = 0 year -= -1 } else{ month -= -1 } } return monthArray[month] + " " + day + ", " + year + " " + hr + ":" + min + ":" + sec } else{ return monthArray[month] + " " + day + ", " + year + " " + hr + ":" + min + ":" + sec } }
function worldClockZone(){ document.getElementById("UTC").innerHTML = worldClock(0, "Greenwich") document.getElementById("CITY2").innerHTML = worldClock(+10, "Greenwich") document.getElementById("CITY1").innerHTML = worldClock(-5, "Greenwich") document.getElementById("CITY3").innerHTML = worldClock(+1, "Greenwich")
setTimeout("worldClockZone()", 1000) } window.onload=worldClockZone;
//-->
.hrow { vertical-align: middle; width: 100%; }
.hrow td { padding: 5px; width: 140px; background-color: #D2D2D2; border: 2px solid #D2D2D2; border-collapse: collapse; font-family:arial; color: #0A0A0A; text-align: center; font-weight: normal; }
.hrow td:hover { background-color: #B2FF4B; color: #222222; border: 2px solid #B2FF4B; }
.hrow td:hover h3 { color: #0A0A0A; }
h3 { text-transform: uppercase; display: inline; color: #0A0A0A; font-family: arial; }
CITY1 | UTC | CITY2 | CITY3 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started