Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started