There is a site if you click on the button Order table, an input form appears. so here I choose an item from the drop-down list, but in the form of send-offs there is absolutely not the item that was chosen, if you click again on the selected item, it changes to the one you need. that's how I implemented it

$(document).ready(function(){ $('.formmenu_1').click(function(){ $('#bil').val($(this).html()); }); }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="1_bil" class="formmenu_1 formmenu_a non_1">Русский Π±ΠΈΠ»ΡŒΡΡ€Π΄</div> <div id="2_bil" class="formmenu_1 formmenu_n formmenu_on non_1">АмСриканский ΠΏΡƒΠ»</div> <div id="3_bil" class="formmenu_1 formmenu_n formmenu_on non_1">Π‘Π½ΡƒΠΊΠ΅Ρ€</div> <input type="text" id="bil" name="bil"/> 

  • In the snippet that you brought there is the problem that you describe? If yes, then tell me what is not exactly how you want (for it works as it should be), if not, then provide code that does not work. - MedvedevDev
  • So far, the only thing I can guess is: you gave the snippet just for example, and you just hang a click on a select, you end up with the current value of the select, and not the one you change, in which case you should replace click with change , probably need more details. - MedvedevDev
  • Yes, it works, but if you go to the website respect-krd.ru and click on the Order table then select the table, you will see the problem. When selecting from the drop-down list, the selected item does not appear in the field - Andrey Vladimirovich
  • set the change, generally stopped displaying the selected item - Andrey Vladimirovich
  • for example, did not set, set as it is on the site. but I realized that I need to put a change, only I need to add something for I don’t want to work if I put change instead of a click) - Andrey Vladimirovich

0