Question: Create a function called showCountryInfo() in the main .js file Call this function in the onchange event of the dropdown list with the id of
Create a function called showCountryInfo() in the main .js file
Call this function in the onchange event of the dropdown list with the id of selectBox
When this function is executed it should navigate to the next page which will be
under the pages folder
For example: location.assign(./pages/country.html?code=CAN);
The code is a query string variable. In the above example, code is CAN. the value of
code should change based on the name of the country selected. If the United States
was selected, code has to be USA.
Write this code in js file pulled from countries.json file
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
