+ 3

Hello my question is can i fix value of box(list) name but not the options value.

https://code.sololearn.com/WiFJPRrP23Uv/?ref=app I want to declare name of list =options it shows value name.

3rd Jun 2017, 2:20 PM
prashant vyas
prashant vyas - avatar
1 Resposta
+ 1
With just HTML you must declare the value and the inner HTML, the text. If you want to capture the value of an option and show it on the inner HTML it involves JavaScript. <select id="Example"> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> var sel = document.getElementById("Example"); var value = sel.options[sel.selectedIndex].value;
13th Jun 2017, 5:23 PM
Felipe Cruz
Felipe Cruz - avatar