JAVASCRIPT countries dropdown list javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

countries dropdown list using javascript


 363

Show ResultJAVASCRIPT


2

<!DOCTYPE html>
<html>
<head>
</head>
<body>

<div id="container"></div>

<script>

var countries = {

AFG: "Afghanistan",
ALB: "Albania",
ALG: "Algeria",
AND: "Andorra",
ANG: "Angola",
ANT: "Antigua and Barbuda",
ARG: "Argentina",
ARM: "Armenia",
ARU: "Aruba",
ASA: "American Samoa",
AUS: "Australia",
AUT: "Austria",
AZE: "Azerbaijan",
BAH: "Bahamas",
BAN: "Bangladesh",
BAR: "Barbados",
BDI: "Burundi",
BEL: "Belgium",
BEN: "Benin",
BER: "Bermuda",
BHU: "Bhutan",
BIH: "Bosnia and Herzegovina",
BIZ: "Belize",
BLR: "Belarus",
BOL: "Bolivia",
BOT: "Botswana",
BRA: "Brazil",
BRN: "Bahrain",
BRU: "Brunei",
BUL: "Bulgaria",
BUR: "Burkina Faso",
CAF: "Central African Republic",
CAM: "Cambodia",
CAN: "Canada",
CAY: "Cayman Islands",
CGO: "Congo",
CHA: "Chad",
CHI: "Chile",
CHN: "China",
CIV: "Cote d'Ivoire",
CMR: "Cameroon",
COD: "DR Congo",
COK: "Cook Islands",
COL: "Colombia",
COM: "Comoros",
CPV: "Cape Verde",
CRC: "Costa Rica",
CRO: "Croatia",
CUB: "Cuba",
CYP: "Cyprus",
CZE: "Czech Republic",
DEN: "Denmark",
DJI: "Djibouti",
DMA: "Dominica",
DOM: "Dominican Republic",
ECU: "Ecuador",
EGY: "Egypt",
ERI: "Eritrea",
ESA: "El Salvador",
ESP: "Spain",
EST: "Estonia",
ETH: "Ethiopia",
FIJ: "Fiji",
FIN: "Finland",
FRA: "France",
FSM: "Micronesia",
GAB: "Gabon",
GAM: "Gambia",
GBR: "Great Britain",
GBS: "Guinea-Bissau",
GEO: "Georgia",
GEQ: "Equatorial Guinea",
GER: "Germany",
GHA: "Ghana",
GRE: "Greece",
GRN: "Grenada",
GUA: "Guatemala",
GUI: "Guinea",
GUM: "Guam",
GUY: "Guyana",
HAI: "Haiti",
HKG: "Hong Kong",
HON: "Honduras",
HUN: "Hungary",
INA: "Indonesia",
IND: "India",
IRI: "Iran",
IRL: "Ireland",
IRQ: "Iraq",
ISL: "Iceland",
ISR: "Israel",
ISV: "Virgin Islands",
ITA: "Italy",
IVB: "British Virgin Islands",
JAM: "Jamaica",
JOR: "Jordan",
JPN: "Japan",
KAZ: "Kazakhstan",
KEN: "Kenya",
KGZ: "Kyrgyzstan",
KIR: "Kiribati",
KOR: "South Korea",
KSA: "Saudi Arabia",
KUW: "Kuwait",
LAO: "Laos",
LAT: "Latvia",
LBA: "Libya",
LBR: "Liberia",
LCA: "Saint Lucia",
LES: "Lesotho",
LIB: "Lebanon",
LIE: "Liechtenstein",
LTU: "Lithuania",
LUX: "Luxembourg",
MAD: "Madagascar",
MAR: "Morocco",
MAS: "Malaysia",
MAW: "Malawi",
MDA: "Moldova",
MDV: "Maldives",
MEX: "Mexico",
MGL: "Mongolia",
MHL: "Marshall Islands",
MKD: "Macedonia",
MLI: "Mali",
MLT: "Malta",
MNE: "Montenegro",
MON: "Monaco",
MOZ: "Mozambique",
MRI: "Mauritius",
MTN: "Mauritania",
MYA: "Myanmar",
NAM: "Namibia",
NCA: "Nicaragua",
NED: "Netherlands",
NEP: "Nepal",
NGR: "Nigeria",
NIG: "Niger",
NOR: "Norway",
NRU: "Nauru",
NZL: "New Zealand",
OMA: "Oman",
PAK: "Pakistan",
PAN: "Panama",
PAR: "Paraguay",
PER: "Peru",
PHI: "Philippines",
PLE: "Palestine",
PLW: "Palau",
PNG: "Papua New Guinea",
POL: "Poland",
POR: "Portugal",
PRK: "North Korea",
PUR: "Puerto Rico",
QAT: "Qatar",
ROU: "Romania",
RSA: "South Africa",
RUS: "Russia",
RWA: "Rwanda",
SAM: "Samoa",
SEN: "Senegal",
SEY: "Seychelles",
SIN: "Singapore",
SKN: "Saint Kitts and Nevis",
SLE: "Sierra Leone",
SLO: "Slovenia",
SMR: "San Marino",
SOL: "Solomon Islands",
SOM: "Somalia",
SRB: "Serbia",
SRI: "Sri Lanka",
STP: "Sao Tome and Principe",
SUD: "Sudan",
SUI: "Switzerland",
SUR: "Suriname",
SVK: "Slovakia",
SWE: "Sweden",
SWZ: "Swaziland",
SYR: "Syria",
TAN: "Tanzania",
TGA: "Tonga",
THA: "Thailand",
TJA: "Tajikistan",
TKM: "Turkmenistan",
TLS: "Timor-Leste",
TOG: "Togo",
TPE: "Chinese Taipei",
TRI: "Trinidad and Tobago",
TUN: "Tunisia",
TUR: "Turkey",
TUV: "Tuvalu",
UAE: "United Arab Emirates",
UGA: "Uganda",
UKR: "Ukraine",
URU: "Uruguay",
USA: "United States",
UZB: "Uzbekistan",
VAN: "Vanuatu",
VEN: "Venezuela",
VIE: "Vietnam",
VIN: "Saint Vincent and the Grenadines",
YEM: "Yemen",
ZAM: "Zambia",
ZIM: "Zimbabwe"

}

var select = document.createElement('select');

for (var key in countries) {

var option = document.createElement('option');
option.setAttribute('value', key);
var text = document.createTextNode(countries[key]);
option.appendChild(text);
select.appendChild(option);

}

document.getElementById("container").appendChild(select);

</script>

</body>
</html>


By        
The power of the user (%)
18%



The most helpful JAVASCRIPT solutions

How can I get the last day and the next day in javascript ?How can I get the last day and the next day in javascript ?JAVASCRIPT

Click to see more ...

  5.8K     507

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  28.9K     396

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  5.1K     301

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  3.8K     258

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  3.4K     203

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  2.8K     205

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  3K     194

fire event when user is idle javascriptfire event when user is idle javascriptJAVASCRIPT

Click to see more ...

  2.9K     186

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  2.4K     184

create earth in universe with three.jscreate earth in universe with three.jsJAVASCRIPT

Click to see more ...

  3.1K     185

Welcome aboard!
We are happy you are here and
wish you good net-raft!