Home >> Javascript >> Onchange event in Javascript

Onchange event in Javascript

An HTML element has been changed.
<script type = "text/javascript">
function findCountry(country) {
   alert country;
<p>Select the following country and see result</p>      
 <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>

Post Your Comment

Next Questions
Onclick event
Onmouseover event
Onkeydown event
Onload event

Copyright ©2022 coderraj.com. All Rights Reserved.