Onchange event in Javascript
An HTML element has been changed.
<script type = "text/javascript">
function findCountry(country) {
alert country;
}
</script>
<p>Select the following country and see result</p>
<form>
<select name="country" onchange = "findCountry(this.value)">
<option value="">Select Country</option>
<option value="India">India</option>
<option value="USA">USA</option>
<option value="UK">UK</option>
</select>
</form>
Post Your Comment