Good afternoon, tell me, please, with such a task, there is a drop-down list of the type
<select id="my_select" name="my_select"> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select>
It is necessary that when selecting an item in the list, a string variable is added with the string of the JS script, i.e. something like
var prog = $("#my_select option:selected").val(); var path = "program" + prog;
I am not strong in JS and therefore I don’t quite understand how to do it right, and the condition is that the page does not need to be reloaded.
Thank you in advance.
$('#my_select').change(function(){var value=$(this).val();});
- zb '