my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes index of option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "index of option" Watch "index of option" New topic

index of option

Sudhir Pawar

Joined: Sep 27, 2012
Posts: 25
please tell me jsp code to get index value of option list(drop down list)

i have created drop down list as follows
<select id="instance2" >
<option value="name">Item0</option>
<option value="name">Item1</option>
<option value="name">Item2</option>

now i want to get index value of selected item in variable then how can i do this?? .
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
MDN Select
I agree. Here's the link:
subject: index of option
It's not a secret anymore!