Home > Web Front-end > JS Tutorial > In-depth explanation of document.write() and unpaired tags of HTML4.01_Basic knowledge

In-depth explanation of document.write() and unpaired tags of HTML4.01_Basic knowledge

WBOY
Release: 2016-05-16 17:34:05
Original
1655 people have browsed it

(1) Non-paired tags in HTML4.01:

Comment tag:

Strictly speaking, it is not an HTML tag: Document declaration tag

Set page meta information: tag

Set the relative directory (such as the root directory) of all links on the web page: tag

Line break:

Horizontal line:


Image:

Form element

Defines the attributes of one or more columns in the table: tag

Defines the frame of a window: tag

Defines the relationship between the document and external resources: Link tag

【Results from querying W3School】

(2) document.write()

1. This method is part of level 0 DON. Calling this method will create a new output stream with the content as the parameter;

2. When called at the top level of the script element, that is, when called outside the window.onload event handle or the defer function, this method will output the content when the parser parses it. Previous documents will not be overwritten at this time.

3. When called in the window.onload event handle or defer function, the content output by this method will overwrite the current document stream. The previous document will be overwritten at this time.

4. When this method is called continuously, the output content is in the same output stream. When the output stream document.close() is closed before calling this method, this method will overwrite the document stream before closing. The document.open() method creates a new output stream, overwriting the previous document stream.

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