javascript - How to change .getElementById.value and assign each value to a variable -


i have got 5 variables , function:

function key(id){     document.getelementbyid('songs').value     =document.albums.names.selectedindex } 

how assign each value (0,1,2,3,4) each variable show in form when clicked on?

just that

<select>   <option value="1">volvo</option>   <option value="2">bmw</option>   <option value="3">mercedes</option>   <option value="4">audi</option> </select> 

see this page documentation


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -