How to add value to the items in the dropdown list?

There is a dropdown list, as it was necessary zayuzat selectmenu to style. How to assign same value of the select, needed for the calculations.

March 23rd 20 at 19:07
2 answers
March 23rd 20 at 19:09
assign what? you have in the screenshot is already the value from the options list.
and in General - take the value and assign.
I need the same value from the list to assign to the highlighted below span the - susan_Rutherford commented on March 23rd 20 at 19:12
@susan_Rutherford, OK. if I understand correctly, you initially have the list and you want each list item to make the span, duplicate the item. then pass the loop over all option, and every option you take the right attributes/values, which are then attached to the new span, which is made through document.createElement('span'), and appendChild the element to the parent span. - rosendo_Boyer commented on March 23rd 20 at 19:15
March 23rd 20 at 19:11
Well, actually 2 options. Each time you Change the select to change the value of the thread in which the hidden inpit and work with it.
$("#select").on("change", function(){

Well, or something like that...

Well second, take the value directly from the select by its id for example. because there is absolutely no point to assign it a value, the stylized menu, it's only for beauty.

Find more questions by tags JavaScriptjQueryHTML