Change select option with var change - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Option


Change select option with var change

Demo Code

ResultView the demo in separate window

      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <select id="select1" onchange="jsFunction(this)"> 
         <option value="1">1</option> 
         <option value="2">2</option> 
         <option value="3">3</option> 
document.getElementById('select1').value = 2;
function jsFunction(select){

   </body>//from w w w  .j a  va2  s  .  c om

Related Tutorials