Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Add a new row of the same HTML macro flex-container

$
0
0

I am new to this. Trying to create a form where one section you tab through and input the information. Then add a row to add the same information (Contacts) right below. I can add the button. But am stuck on the "onclick".

<!DOCTYPE html><html><head><style>.flex-container {  display: flex;}.flex-container > div {  margin: 5px;  font-size: 16px;}</style></head><body><p></p><div><div class="flex-container"><div>Name</div><div class="grow-wrap"><textarea name="Name"id="text"onInput="this.parentNode.dataset.replicatedValue =    this.value"></textarea></div><div>Position/Title</div><div class="grow-wrap"><textarea name="Position/Title"id="text"onInput="this.parentNode.dataset.replicatedValue = this.value">    </textarea></div><div>Email</div><div class="grow-wrap"><textarea name="Email"id="text"onInput="this.parentNode.dataset.replicatedValue = this.value"></textarea></div><div>Phone</div><div class="grow-wrap"><textarea name="Phone" id="text" onInput="this.parentNode.dataset.replicatedValue = this.value"></textarea></div><table id="myTable">
</table><button id="addRowBtn">Add Row</button><script>  $(document).ready(function () {    $('#addRowBtn').click(function () {      const newRow = $('<tr>');      newRow.append('<td>Name</td>');      newRow.append('<td>Position/Title</td>');      newRow.append('<td>Email</td>');      newRow.append('<td>Phone</td>');    });  });</script>

Customer Contacts

Customer Contacts (continued)

Customer Contacts 2


Viewing all articles
Browse latest Browse all 1675

Trending Articles