First create a page as follows: There are two tables here, the upper one has data, the lower one has no data, only a header! Copy code The code is as follows: 1I am ChineseStudy hard 2I am ChineseStudy hard 3I am ChineseStudy hard ; td>I am ChineseStudy hard type="text" value="60" style="width:50px" />< td>I am ChineseStudy hard ='1px' width="500px" id="table2"> IDAgeMoney td>name 🎜>Now click the Add button to dynamically add the data of the current row in the point to the TABLE below. The javascipt code is as follows: Copy the code The code is as follows: <br> function butd(rows) {<br> var rows = rows.parentNode.parentNode.rowIndex //Find the currently selected row<br> var mytable = document.getElementById('tables'); //Find the current table;<br> var Romm_price = mytable.rows[rows].cells[0].innerText; //Find the value of the first column of the current row <br> var room_rows = mytable.rows[rows].cells[1].children[0].value; //Find the value of the first text box in the second column of the current row;<br> var room_rows2 = mytable. rows[rows].cells[1].children[1].value; //Find the value of the second text box in the second column of the current row;<br> var room_rows3 = mytable.rows[rows].cells[2 ].innerText; //Find the value of the third column of the current row;<br> ; 🎜> _ID = x.insertCell (2);<br> var room_row = x.insertCell(3);<br> Romm_typename.innerHTML = Romm_price;<br> txtDate.innerHTML = room_rows;<br> Guest_ Type_ID.innerHTML = room_rows2;<br> room_row.innerHTML = room_rows3;<br> }<br> The most important thing in this is how to get the current row you click on, and then how to manually add the data of the current row into the table!