It’s for choosing state and city based on choosing the country, when we choose a country, in a second select option field will show the states, what are all presents in the country, that is the concept. Let see how it works.
like the above image sample, when we choose the country, we can automatically show, what are the state are the in the country, for that we are using this code and script.
the above script is sample script of select state based on country, when we select the country, that will show the second dropdown select box will show the states, the above is script,
that's it, enjoy with the demo.