How can I show the user's choice when they click on input type text using JavaScript?
I want to use onclick on input type text. When the user clicks, I want to show their choice.
I tried searching for a function to do that, but I did not find any.
Could you please advise me on how to do that?
Image:

*remark : Australia , United Kingdom and United States not from database.
you can use below code if your browser supports html5
<html>
<body>
<label for="country_name">Country : </label><input id="country_name" name="country_name" type="text" list="country" />
<datalist id="country">
<option value="Australia">
<option value="United Kingdom">
<option value="United States">
</datalist>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With