Home > Web Front-end > JS Tutorial > body text

javascript small example of manually adding data to the table_javascript skills

WBOY
Release: 2016-05-16 17:29:09
Original
1174 people have browsed it

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!
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1I am ChineseStudy hard
2I am ChineseStudy hard
3I am ChineseStudy hardI am ChineseStudy hardStudy hard
IDAgeMoneyname