There are markup

<select> <option data-id="сылка 1">1</option> <option data-id="сылка 2">2</option> <option data-id="сылка 3">3</option> <option data-id="сылка 4">4</option> </select> 

as when selecting a certain select, I threw it on the link that is specified in the option attribute by jquery

    2 answers 2

     <select onchange="if (this.value) window.location.href = this.value"> <option value="">select:</option> <option value="https://www.gismeteo.ru">gismeteo</option> <option value="http://www.nova-wings.ru/forecast/">nova-wings</option> </select> 

      More as an option

       $("select").change(function() { var option = $(this).find('option:selected'); window.location.href = option.data("url"); }); 
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <select> <option data-url="http://www.google.com">1</option> <option data-url="https://www.yandex.ru">2</option> </select> 

      • I think it's stupid - Yuri
      • @Yuri - argue - soledar10
      • Refer to the selected option , then from there to the data-id ... it is very confusing to solve this problem. And + the name id for data does not carry any meaning in itself, + if there is not a link indicated there or data is not specified at all, then there will be a confusion - Yuri
      • What is your solution to this problem ?. Regarding the data-id attribute, I don’t see any problems by changing to data-url - soledar10
      • The decision is the same as in the accepted answer, only I would have finished it - Yuri