On the page there is a profile with text fields, tables and other. The user can add fields dynamically, i.e. clicks a button and another text field appears where he writes something down. Once finished - presses the send button. You need everything that he wrote to send an email . Of course, it is possible through javascript
to access in turn all the elements, read their values, compose the body of the letter and send, but there are many of them ... Is it possible to get the full contents of the block where all the necessary information is located? Tried through $("#moydiv").html()
- does not help.
CODE:
<div id="app"> <div> <div> <strong> <center> Общие сведения об организации: </center> </strong> </div> <hr> <div> Наименование организации: </div> <div> <input type="text" name="" id="name_company" class="input_app"> </div> <div> Наименование объекта информатизации (ОИ): </div> <div> <input type="text" name="" id="name_oi" class="input_app"> </div> <br><center><strong>Окна:</strong></center> </div> <div> <table> <colgroup> <col width="250"> <col width="100"> <col width="100"> <col> <col width="120"> <col width="120"> </colgroup> <thead style="border: 1px solid;"> <tr> <th rowspan="2" style="text-align: center;"> Номер окна </th> <th colspan="2" style="text-align: center;border: 1px solid;">Размеры (м)</th> <th rowspan="2" style="text-align: center;border: 1px solid;">Материал</th> <th rowspan="2" style="text-align: center;border: 1px solid;">Количество сегментов стекла</th> <th rowspan="2" style="text-align: center;border: 1px solid;">Расстояние межд. стекл. (мм)</th> </tr> <tr> <th style="text-align: center;border: 1px solid;">Шир. (м)</th> <th style="text-align: center;border: 1px solid;">Выс. (м)</th> </tr> </thead> <tbody id="okna"> <tr> <td style="width: 100px; border: 1px solid; padding: 5px;"> <input name="OKNO[]" type="text" class="form__input" placeholder="№"> </td> <td style="width: 50px;border: 1px solid;padding: 5px;"> <input name="SHIR[]" type="text" class="form__input"> </td> <td style="width: 50px;border: 1px solid;padding: 5px;"> <input name="VIS[]" type="text" class="form__input"> </td> <td style="width: 100px;border: 1px solid;padding: 5px;"> <select name="MAT[]" style="height: 38px; width: 100%; border:none;"> <option value="пластик">пластик</option> <option value="дерево">дерево</option> </select> </td> <td style="width: 50px;border: 1px solid;padding: 5px;"> <input name="KOLO[]" type="text" class="form__input"> </td> <td style="width: 50px;border: 1px solid;padding: 5px;"> <input name="ORASST[]" type="text" class="form__input"> </td> </tr> </tbody> </table> <div style="margin-top: 10px"> <input type="button" name="" value="Добавить" onclick="addotss()" class="mybutton"> // эта функция добавляет строчки в таблицу </div> <form action="index.php" method="post"> <!--<input type="submit" name="tutu" value="Добавить">--> <input type="button" name="" value="отправить" onclick="sendmes()" class="mybutton"> </form> </div>