Home  >  Article  >  Web Front-end  >  javascript small example of manually adding data to the table_javascript skills

javascript small example of manually adding data to the table_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:29:091128browse

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:












;
                                                        type="text" value="60" style="width:50px" />< td>I am Chinese
                                                                       ='1px' width="500px" id="table2">

🎜>

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:




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!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
1I am ChineseStudy hard
2I am ChineseStudy hard
3I am ChineseStudy hardI am ChineseStudy hardStudy hard
IDAgeMoneyname