Drop down listbox onChange event

We can read the selected option of a drop down list box by using onChange event trigger. The onChange event will trigger one JavaScript function and we will try to read the selected item by using getElementById
<select id=s1 name=no_year onChange="show_date()";>
Demo of OnChange Listbox

Here is the code
<title>Demo Project on JavaScript listbox onChange</title>
<script type="text/javascript"> 
function show_date(){
document.getElementById("msg3").innerHTML= document.getElementById("s1").value;
return true;


<select id=s1 name=no_year onChange="show_date()";>
<option value=Jan>January</option>
<option value=Feb>February</option>
<option value=March>March</option>
<option value=April>April</option>
<option value=May>May</option>

<div id='msg3'></div>

OnChange event of dropdown list box to trigger a function to reload the page with selected data

Selection of Multiple selection listbox Listbox Adding option to Listbox
JavaScript Validation
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net


    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer