khoảng chách không phận
|
<html> |
|
|
|
|
|
|
<head> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
|
|
<meta name="GENERATOR" content="Microsoft FrontPage 4.0"> |
|
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
|
|
<title>Kho?ng cách không ph?n</title> |
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
<!-- Cut-N-Paste JavaScript from ISN Toolbox |
|
|
Copyright 1996, Infohiway, Inc. Restricted use is hereby |
|
|
granted (commercial and personal OK) so long as this code |
|
|
is not *directly* sold and the copyright notice is buried |
|
|
somewhere deep in your HTML document. A link to our site |
|
|
http://www.infohiway.com is always appreciated of course, |
|
|
but is absolutely and positively not necessary. ;-) --> |
|
|
<script language="JavaScript"> |
|
|
<!-- Hide from JavaScript-Impaired Browsers |
|
|
var l=0; |
|
|
var r=0; |
|
|
var tc=""; |
|
|
var al=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"; |
|
|
var ns="0123456789"; |
|
|
function iA(){ |
|
|
this.length=iA.arguments.length; |
|
|
for (var i=0;i<this.length;i++){ |
|
|
this[i]=iA.arguments[i]; |
|
|
} |
|
|
} |
|
|
/* 3011 byte database of air distances uses position in the |
|
|
string "al" to substitute for the numerics, saving a bit |
|
|
over 4k download to visitors. */ |
|
|
var a=new iA(35); |
|
|
a[0]="Berlin, Germany* ciagchdcheihh dadeee gcaa hdef egeghfaci" |
|
|
+"ibf da cifdcd ebehe eddegagecehadhfaa gcgh e debbfageedkbgdca"; |
|
|
a[1]="Bombay, India* ibga deacde dhabfgh bbiifhgddfhg caefa igb" |
|
|
+"cacggiei dacigddcfbifbffgcgeaihbfchdj dggdcacbdcdaigfhbhf"; |
|
|
a[2]="Buenos Aires, Argentina* jbddbgiaceifkdfgefgegggffibfabk " |
|
|
+"dgbcdfchchec hhegfacchfhhkiggcfefhga abbfic gffialb ihfkd fbffdb"; |
|
|
a[3]="Calcutta, India* f ccgdeebaecg dcfefccdiehaebaieeeie cdeg" |
|
|
+"ibebgddfjaadhib bceagdhedaichde jiigbbbaaagicaig dchf"; |
|
|
a[4]="Capetown, South Africa* fiee hgcgkecebbjccf aiiggecfdahea" |
|
|
+"fbigh jaafdig aehdh edeighfgaacggebee jb h ff bi gg bbce"; |
|
|
a[5]="Darwin, Australia* ibgbfdecfgcigaahf ghdaihaifi hg eiiffb" |
|
|
+"dh bjcehehcgcgafigbhfciifhaihifgfbcadb hccgccafda"; |
|
|
a[6]="Gibraltar* fhch hahgebga ieidgdhjh efcbdacfced agidic iff" |
|
|
+" abahcchb edgha cfdaedfffegbcfiil fda "; |
|
|
a[7]="Hong Kong* eeddihefceihgbd fidfahghdddh edeeecdj h" |
|
|
+"eifabcdihgfef ck eggkfafdg ggafeah eheeda"; |
|
|
a[8]="Honolulu, Hawaii, USA* ha bhbgbcbefec eeacghg cdifc fghe" |
|
|
+"begdce ghgde f hhaih bfgibfhdicfgachedgajhg"; |
|
|
a[9]="Istanbul, Turkey* ee aeefhdeffi iga a ie aea aebfgead dch" |
|
|
+" fidfdbeffd hehagf fdifecgeefjffcca"; |
|
|
a[10]="Juneau, Alaska, USA* ddbahdehgh dcbbdecbhea id eddfdfcde" |
|
|
+"bfbbbffcbggf ebegbg i dhggbdd agdhhh "; |
|
|
a[11]="London, England, UK* eddffgje eedaeecdfdch gaebh bae eba" |
|
|
+"eca aagegg higbfdghegafgdeidkfhdf "; |
|
|
a[12]="Los Angeles, California, USA* gbggicaedf gbdebhheccc ef" |
|
|
+" fbegecbehdcafc fcceec iffdhhggedgfgaj b"; |
|
|
a[13]="Manilla, Phillipines* cidhhceachdidhbf bjbhffgagg" |
|
|
+"efbhabffekbefdfjicffdaaeadhahfeafegf"; |
|
|
a[14]="Melbourne, Australia* hdbhifjcfgefiici bjd efghffje jedh" |
|
|
+"aiiicg haie acgfe iaf fh "; |
|
|
a[15]="Mexico City, Mexico* ffib idcaegaae egaggcgfgbdedfbdggfc" |
|
|
+"ed ebcdh djcag dfi idh"; |
|
|
a[16]="Moscow, Russia* dffd da bfgaaedcf agadbdb fgb adghgieb d" |
|
|
+"bdebddfejbhdbg"; |
|
|
a[17]="New York City, New York, USA* cggcfgbbccfbfhbeei ddbehdh" |
|
|
+"bdbge ibdagcfifcfgdhiegg "; |
|
|
a[18]="Nome, Alaska, USA* chdeeddegcdcegecdiccgheie hhcfaihcghf" |
|
|
+"aebihgchhba"; |
|
|
a[19]="Oslo, Norway* efi hcdcfbbacbfa hfdhabdgiadeie bfbeebbjig" |
|
|
+"dh "; |
|
|
a[20]="Panama City, Panama* echhiagaebffdgacbiei bidcfeicbkfihd" |
|
|
+"bgdchbe"; |
|
|
a[21]="Paris, France* ea aihcbdacheg fhgbediiegeffgf ckgidd "; |
|
|
a[22]="Peking, China* dehfdbdi jgge ekgged ffbggacafg eh "; |
|
|
a[23]="Port Said, Suez Canal, Egypt* ebecbcfbdacbh ifgfeace ieh" |
|
|
+"djbebgc"; |
|
|
a[24]="Quebec, Quebec, Canada* baieaccidee bcefihia fdbibcgdd"; |
|
|
a[25]="Reykjavik, Faxa Bay, Iceland* fabb dgbccfaeefgafedgjgbegf"; |
|
|
a[26]="Rio de Janeiro, Brazil* efiahffhikcdiggkedgceeei"; |
|
|
a[27]="Rome, Italy* gdbeffefhfbcfabkebcga"; |
|
|
a[28]="Santiago, Chile* fbckfejbcjfdegigah"; |
|
|
a[29]="Seattle, Washington, USA* eg h fdghgbdicf"; |
|
|
a[30]="Shanghai, China* bcha if eeig"; |
|
|
a[31]="Singapore, Singapore* cc ebiddh"; |
|
|
a[32]="Tokyo, Japan* egfg d"; |
|
|
a[33]="Wellington, New Zealand* hab"; |
|
|
a[34]="Zanzibar City, Tanzania* "; |
|
|
var b=new iA(4); |
|
|
b[0]=1; |
|
|
b[1]=10; |
|
|
b[2]=100; |
|
|
b[3]=1000; |
|
|
b[4]=10000; |
|
|
function getMiles(form){ |
|
|
lf=(document.isn.isn1.options[document.isn.isn1.selectedIndex].value); |
|
|
rf=(document.isn.isn2.options[document.isn.isn2.selectedIndex].value); |
|
|
l=al.indexOf(lf); |
|
|
r=al.indexOf(rf); |
|
|
if (r<l){ |
|
|
l=r; |
|
|
r=al.indexOf(lf); |
|
|
} |
|
|
ls=a[l]; |
|
|
pos=ls.indexOf("*") |
|
|
ls1="From "+ls.substring(0,pos)+" to " |
|
|
+a[r].substring(0,a[r].indexOf("*"))+" is about "; |
|
|
ls=ls.substring(pos+1,ls.length); |
|
|
tc=ls.substring(((r*3)-(l*3)),ls.length); |
|
|
if (document.isn.rb[1].checked){ |
|
|
dispKm(); |
|
|
} |
|
|
else{ |
|
|
dispMi(); |
|
|
} |
|
|
} |
|
|
function dispMi(){ |
|
|
ch=tc.charAt(0); |
|
|
ls1+=al.indexOf(ch); |
|
|
ch=tc.charAt(1); |
|
|
ls1+=al.indexOf(ch); |
|
|
ch=tc.charAt(2); |
|
|
if (ch!=" "){ |
|
|
ls1+=(al.indexOf(ch)*10)+" miles"; |
|
|
} //1.613 |
|
|
else ls1+="00"+" miles"; |
|
|
document.isn.disp.value=ls1; |
|
|
} |
|
|
function dispKm(){ |
|
|
ch=tc.charAt(0); |
|
|
km=""; |
|
|
km+=al.indexOf(ch); |
|
|
ch=tc.charAt(1); |
|
|
km+=al.indexOf(ch); |
|
|
ch=tc.charAt(2); |
|
|
if (ch!=" "){ |
|
|
km+=(al.indexOf(ch)*10); |
|
|
} |
|
|
else{ |
|
|
km+="00"; |
|
|
} |
|
|
num=0; |
|
|
kml=km.length; |
|
|
for (var i=kml-1;i>-1;i--){ |
|
|
cr=km.substring(i,i+1); |
|
|
pos=ns.indexOf(cr); |
|
|
num+=pos*b[kml-i-1]; |
|
|
} |
|
|
km=""; |
|
|
km+=num*1.613; |
|
|
pos=km.indexOf("."); |
|
|
if (pos>-1){ |
|
|
km=km.substring(0,pos); |
|
|
} |
|
|
ls1+=km+" kilometres"; |
|
|
document.isn.disp.value=ls1; |
|
|
} |
|
|
// End Hiding --> |
|
|
</script> |
|
|
<script language="JavaScript"> |
|
|
<!-- |
|
|
function retrace() |
|
|
{ |
|
|
history.back() |
|
|
} |
|
|
// --> |
|
|
</script> |
|
|
<center><h1><font face="Arial">Khoảng cách không phận</font></h1><form name="isn"> |
|
|
<table border=0 width=500> |
|
|
<tr><td colspan=3 align=center> |
|
|
<font face="Arial">Đ</font><font face="Arial">o khoảng cách không phận từ |
|
|
thành phố này đến thành phố khác </font></td></tr> |
|
|
<tr><td align=center><font face="Arial"><font color="blue"> |
|
|
<b>Starting City</b></font><br><select name="isn1" size=12> |
|
|
<script language="JavaScript"> |
|
|
<!-- Hide from JavaScript-Impaired Browsers |
|
|
ls=""; |
|
|
for (var i=0;i<35;i++){ |
|
|
ls+='<OPTION VALUE="'+al.substring(i,i+1)+'" onClick=""'; |
|
|
if (i==0){ls+=' SELECTED';} |
|
|
ls+='>'+a[i].substring(0,a[i].indexOf("*")); |
|
|
} |
|
|
document.write(ls); |
|
|
// End hiding --> |
|
|
</script> |
|
|
</select></font></td> |
|
|
<td align=center valign=top><font face="Arial"><font color="blue"> |
|
|
<b>Instructions:</b></font> |
|
|
<br>Lựa chọn thành phố ban đầu và thành phố sẽ đến,rồi |
|
|
"đo khoảng cách"</font><p> |
|
|
<font face="Arial"> |
|
|
<input type="button" name="but" value="Do khoang cach" onclick="getMiles(this.form)"> |
|
|
<br><input type="radio" name="rb" value="a" checked onclick="">Miles<br> |
|
|
<input type="radio" name="rb" value="b" onclick="">Kilometres</font> |
|
|
<td align=center><font face="Arial"><font color="blue"> |
|
|
<b>Destination City</b></font> |
|
|
<br><select name="isn2" size=12> |
|
|
<script language="JavaScript"> |
|
|
<!-- Hide from JavaScript-Impaired Browsers |
|
|
ls=""; |
|
|
for (var i=0;i<35;i++){ |
|
|
ls+='<OPTION VALUE="'+al.substring(i,i+1)+'" onClick=""'; |
|
|
if (i==1){ls+=' SELECTED';} |
|
|
ls+='>'+a[i].substring(0,a[i].indexOf("*")); |
|
|
} |
|
|
document.write(ls); |
|
|
// End hiding --> |
|
|
</script> |
|
|
</select></font></td></tr> |
|
|
<tr><td colspan=3 align=center> |
|
|
<table border=2> |
|
|
<tr><td> |
|
|
<font face="Arial"> |
|
|
<input type="text" name="disp" value="" size=80> |
|
|
</font> |
|
|
</td></tr> |
|
|
</table></td></tr> |
|
|
<tr><td colspan=3><hr noshade></td></tr> |
|
|
</table> |
|
|
</form></center> |
|
|
</body> |
|
|
|
|
|
</html> |
Trần Phương @ 12:24 07/02/2011
Số lượt xem: 542
- CODE LINK CÓ ẢNH (07/02/11)
- LIÊN KẾT (01/02/11)
- CODE ĐỒNG HỒ 24H (01/02/11)
- MỘT SỐ CODE THÔNG BÁO (01/02/11)
- CODE 2 MẮT THEO CHUỘT (01/02/11)
Các ý kiến mới nhất