Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Time Zones EDIT HELP CITY1 September 15, 2018 18:44:36 UTC Scptember 15, 2018 23:44.36 CITY2 Scptember 16, 2018 944:36 CITY3 September 16, 2018 0:44:36

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions