»
EnglishFrenchVietnamese

Print - Global Time Zone (Japan=1am JST) - JavaScriptBank.com

Full version: jsB@nk » Time » Clock » Global Time Zone (Japan=1am JST)
URL: https://www.javascriptbank.com/global-time-zone-japan.html

Global Time Zone (Japan=1am JST) © JavaScriptBank.comPick a country 'from' and a country 'to' get the time difference. Then, enter a time in the window and the time changes to the correct value in other country. The trick was with a +: I needed to use -(a*-1); because strings add each other!

Full version: jsB@nk » Time » Clock » Global Time Zone (Japan=1am JST)
URL: https://www.javascriptbank.com/global-time-zone-japan.html



CSS
<STYLE>A:hover {COLOR: yellow}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript><!--cloaking device on// nick van vliet// http://geocities.com/klaus_vanv/javagames/games.htm    function Chck(form) {var acheck=(1*form.F.value - (48*-1) )form.F.value=acheck % 24var acheck=(1*form.C.value - (48*-1) )form.C.value=acheck % 24    }    function Cvalue(form) {      form.R.value = form.C.value - form.F.value;    }    function Addvalue(form) {     form.C.value = form.F.value + form.R.value;       }// cloaking device off --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM><TABLE style="FONT-WEIGHT: bold" bgColor=cyan border=2>  <TBODY>  <TR><!--top row-->    <TD align=middle>ZONE 1</TD>    <TD align=middle>Time Difference</TD>    <TD align=middle>ZONE 2</TD></TR>  <TR><!--left column FRC -->    <TD align=middle><SELECT       onchange="C.value = TB.options[TB.options.selectedIndex].value;F.value= this.options[selectedIndex].value; Cvalue(this.form)"       size=12 name=TA> <OPTION value=0>HONG KONG, MANILA<OPTION value=1>TOKYO,         OKINAWA<OPTION value=2>MELBOURNE, SYDNEY<OPTION value=3>NOUMEA<OPTION         value=4>WELLINGTON, NZ<OPTION value=5>SAMOA<OPTION value=6>ANCHORAGE,         HONOLULU<OPTION value=7>SITKA<OPTION value=8>SAN FRANCISCO,         SEATTLE<OPTION value=9>DENVER, PHOENIX<OPTION value=10>CHICAGO,         MEXICO<OPTION value=11 selected>NEW YORK, TORONTO, HAVANA<OPTION         value=12>SANTIAGO<OPTION value=13>RIO DE JANEIRO<OPTION         value=14>AZORES<OPTION value=15>REYKJAVIK<OPTION value=16>LONDON,         LISBON<OPTION value=17>AMSTERDAM, GDANSK<OPTION value=17>ROME, PARIS,         OSLO<OPTION value=18>ATHENS, CAIRO, TEL AVIV<OPTION         value=19>BAGHDAD<OPTION value=20>TEHRAN<OPTION value=21>KARACHI, NEW         DELHI +.5<OPTION value=22>RANGOON +.5<OPTION value=23>BANKOK,         SINGAPORE</OPTION></SELECT> </TD>    <TD align=middle><!--middle column--><INPUT type=reset value=Reset name=Reset>     </TD>    <TD align=middle><!--right column FRC --><SELECT       onchange="C.value = this.options[selectedIndex].value;F.value = TA.options[TA.options.selectedIndex].value;  Cvalue(this.form);"       size=12 name=TB> <OPTION value=0>HONG KONG, MANILA<OPTION value=1>TOKYO,         OKINAWA<OPTION value=2>MELBOURNE, SYDNEY<OPTION value=3>NOUMEA<OPTION         value=4>WELLINGTON, NZ<OPTION value=5>SAMOA<OPTION value=6>ANCHORAGE,         HONOLULU<OPTION value=7>SITKA<OPTION value=8>SAN FRANCISCO,         SEATTLE<OPTION value=9>DENVER, PHOENIX<OPTION value=10>CHICAGO,         MEXICO<OPTION value=11>NEW YORK, TORONTO, HAVANA<OPTION         value=12>SANTIAGO<OPTION value=13>RIO DE JANEIRO<OPTION         value=14>AZORES<OPTION value=15>REYKJAVIK<OPTION value=16>LONDON,         LISBON<OPTION value=17>AMSTERDAM, GDANSK<OPTION value=17 selected>ROME,         PARIS, OSLO<OPTION value=18>ATHENS, CAIRO<OPTION value=19>BAGHDAD<OPTION         value=20>TEHRAN<OPTION value=21>KARACHI, NEW DELHI +.5<OPTION         value=22>RANGOON +.5<OPTION value=23>BANKOK, SINGAPORE</OPTION></SELECT>     </TD></TR>  <TR><!--bottom row FRC       form.C.value = form.F.value + form.R.value  -->    <TD align=middle><!--left column c=f+r--><INPUT       onchange="C.value = this.value - (R.value*-1);Chck(this.form)" size=10       value=11 name=F><BR></TD>    <TD align=middle><!--middle column c=f+r--><INPUT size=6 value=6       name=R><BR></TD>    <TD align=middle><!--right column f=c/r  --><INPUT       onchange="F.value = this.value - R.value;Chck(this.form)" size=10 value=17       name=C><BR></TD></TR></TBODY></TABLE></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->