", "link", "script", "style" ."/> ", "link", "script", "style" .">

Home  >  Article  >  Web Front-end  >  What are the HTML tags that support the onload event?

What are the HTML tags that support the onload event?

青灯夜游
青灯夜游Original
2020-12-31 11:51:133451browse

HTML tags that support onload events are: "body", "frame", "frameset", "iframe", "img", "", "link", "script", "style" ".

What are the HTML tags that support the onload event?

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

Recommended: html tutorial

onload event

onload event will occur when the page or image is loaded Occurs immediately upon completion. onload is usually used for the 6c04bd5ca3fcae76e30b72ad730ca86d element to execute script code after the page is completely loaded (including images, css files, etc.).

Syntax

//在 HTML 中:
<body onload="SomeJavaScriptCode">

//在 JavaScript 中:
window.onload=function(){SomeJavaScriptCode};

Parameters:

SomeJavaScriptCode: Required. Specifies the JavaScript to be executed when this event occurs.

HTML tags that support onload events

##6c04bd5ca3fcae76e30b72ad730ca86d

6c04bd5ca3fcae76e30b72ad730ca86d Tags define the body of the document. The

6c04bd5ca3fcae76e30b72ad730ca86d element contains all the content of the document (such as text, hyperlinks, images, tables, lists, etc.).

04a0d55efbbfd646a993fbc01f262c57

04a0d55efbbfd646a993fbc01f262c57 tag defines the child window (frame) in f900b4fc197b16ab214eecf015bb6bd2.

Each 04a0d55efbbfd646a993fbc01f262c57 inf900b4fc197b16ab214eecf015bb6bd2 can set different properties, such as border, scrolling, noresize, etc.

Note: If you wish to validate pages containing frames, make sure 1a309583e26acea4f04ca31122d8c535 is set to "HTML Frameset DTD" or "XHTML Frameset DTD".

f900b4fc197b16ab214eecf015bb6bd2

f900b4fc197b16ab214eecf015bb6bd2 tag defines a frameset.

Thef900b4fc197b16ab214eecf015bb6bd2 element is used to organize one or more 04a0d55efbbfd646a993fbc01f262c57 elements. Each 04a0d55efbbfd646a993fbc01f262c57 has its own separate document. The

f900b4fc197b16ab214eecf015bb6bd2 element specifies how many columns or rows exist in the frameset, and the percentage/pixels occupied by each row and column.

Note: If you wish to validate pages containing frames, make sure 1a309583e26acea4f04ca31122d8c535 is set to "HTML Frameset DTD" or "XHTML Frameset DTD". The

d5ba1642137c3f32f4f4493ae923989c

d5ba1642137c3f32f4f4493ae923989c tag specifies an inline frame.

An inline frame is used to embed another document within the current HTML document. The

a1f02c36ba31691bcfe87b2722de723b

a1f02c36ba31691bcfe87b2722de723b tag defines an image in an HTML page.

a1f02c36ba31691bcfe87b2722de723b tags have two required attributes: src and alt.

Note: Technically, images are not inserted into the HTML page, but linked to it. The a1f02c36ba31691bcfe87b2722de723b tag creates a placeholder for the referenced image.

Tip: Add a link to another document by nesting an a1f02c36ba31691bcfe87b2722de723b tag within an 3499910bf9dac5ae3c52d5ede7383485 tag.

0b8441e4390851031b18beb35bf01222

d5fd7aea971a85678ba271703566ebfd tag specifies an input field in which the user can enter data.

Thed5fd7aea971a85678ba271703566ebfd element is used in the ff9c23ada1bcecdd1a0fb5d5a0f18437 element to declare an input control that allows users to enter data.

Input fields can be changed in a variety of ways, depending on the type attribute.

type="image" means defining an image as a submit button.

2cdf5bf648cf2f33323966d7f58a7f3f

2cdf5bf648cf2f33323966d7f58a7f3f Tags define the document's relationship to external resources. The most common use of the

2cdf5bf648cf2f33323966d7f58a7f3f tag is to link style sheets.

3f1c4e4b6b16bbbd69b2ee476dc4f83a

3f1c4e4b6b16bbbd69b2ee476dc4f83a tag is used to define client-side scripts, such as JavaScript. The

3f1c4e4b6b16bbbd69b2ee476dc4f83a element can either contain script statements or point to an external script file through the "src" attribute.

JavaScript is commonly used for image manipulation, form validation, and dynamic content changes.

c9ccee2e6ea535a969eb3f532ad9fe89

c9ccee2e6ea535a969eb3f532ad9fe89 tag defines the style information of the HTML document.

In the c9ccee2e6ea535a969eb3f532ad9fe89 element, you can specify how the HTML document is rendered in the browser.

Each HTML document can contain multiple c9ccee2e6ea535a969eb3f532ad9fe89 tags.

For more programming-related knowledge, please visit:

Programming Teaching! !

The above is the detailed content of What are the HTML tags that support the onload event?. For more information, please follow other related articles on the PHP Chinese website!

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