Hello. I have a calculator . Which variable should be added to the script so that the final line <div class="calc-itogo"><span class="cena-izdeliya"></span></div> displayed in <textarea name="d[2]" id="d[2]" required=""></textarea>/ by pressing the button. Please help me figure it out.

 <script> $(function () { $('.form-button').on('click', function () { $("#d\\[2\\]").val("Johnny Bravo"); }); }) </script> <a class="form-button" href="#">КНОПКА</a> <textarea name="d[2]" id="d[2]" required=""></textarea> 

Here is a sketch of another sketch of the code.

  • unless you are satisfied with the answer "can" (or "no")? I think it is unlikely. therefore, please formulate a full question by clicking edit . - aleksandr barakin

0