Home > Web Front-end > HTML Tutorial > Understanding innerHTML_HTML/Xhtml_Web page production

Understanding innerHTML_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:45:32
Original
1802 people have browsed it

Related articles: innerHTML
HTML DOM insertRow() method
Definition and Usage
Definition and usage
The insertRow() method is used to insert a new row in a specified position in a table.
insertRow() The method can be used to insert a new row into the specified position in the table
Syntax Syntax
tableObject.insertRow(index)//Index, add a new row
-------------- -------------------------------------------------- ----------------
Example Example














Row1 cell1 Row1 cell2
Row2 cell1 Row2 cell2





Row1 cell1 Row1 cell2
Row2 cell1 Row2 cell2

//Place controls in the form
value="Insert new row before the first row">//value is what will be displayed on the control The content of


In the js method, you can directly use the id.innerHtml of the paired tags to assign the tag content without declaring variables in the js method.
innerHTML is an attribute of the html tag, and most of the tags that appear in pairs have This attribute //The tag attribute
is the character between the start tag and the end tag, excluding the tag itself such as
aaaaaaaaaa
bbbbbbbb


here The p tag and the span tag are nested together
Then the content of pp.innerHTML is

aaaaaaaaaabbbbbbbb

The content of ss.innerHTML is
bbbbbbbb
==== ===================== A similar attribute is outerHTML Then the content of pp.outerHTML is aaaaaaaaaa bbbbbbbb The content of ss.outerHTML is bbbbbbbb
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