Jump to content

List Box JavaScript


alwaysvaghu
 Share

Recommended Posts

HiI want to know how to use onChange function in listbox of javascriptPlease help me with example....VAGHU

javascript
function doSomething(selBox){     alert(selBox[selBox.selectedIndex].value);}

html

<select onChange="doSomething(this)"><option value="1">One</option><option value="2">Two</option></select>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...