JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JS Test</title>

<script type="text/javascript">

function switchStates(obj) {    
    if (obj.selectedIndex==14){document.getElementById('statesUSA').style.visibility='visible'}else {document.getElementById('statesUSA').style.visibility='hidden'};
    if (obj.selectedIndex==2){document.getElementById('statesIRL').style.visibility='visible'}else {document.getElementById('statesIRL').style.visibility='hidden'};
    if (obj.selectedIndex==15){document.getElementById('statesCAN').style.visibility='visible'}else {document.getElementById('statesCAN').style.visibility='hidden'};

}

</script>

</head>
<body>


<form action="test.aspx" method="post"> 

<label for="qq_deliverycountry">Country</label> 

                            <select id="qq_deliverycountry" name="dcountry" onchange="switchStates(this)"> 

                              <option selected="selected" value="GBR">United Kingdom (Mainland)</option>



                            <option value="">--------------------</option>



                            <option value="IRL">Republic of Ireland</option>



                            <option value="GGY">Channel Islands (Guernsey)</option>



                            <option value="JEY">Channel Islands (Jersey and Sark)</option>



                            <option value="NIR">Northern Ireland</option>



                            <option value="">--------------------</option>



                            <option value="FRA">France</option>



                            <option value="DEU">Germany</option>



                            <option value="ITA">Italy</option>



                            <option value="POL">Poland</option>



                            <option...