Code:
function showText()
{
//This functions is used show selected value of listbox into textbox.
var objselect;
var txtval;
objselect=document.forms['form1'].Departments;
//Get the selected value from listbox
txtval=objselect.options[objselect.selectedIndex].value;
Leave a comment: