Skip to content

“Output” Element Usage

The HTML Output Element is used to indicate the result of a calculation or output from the user’s process.

A standard output element accepts the following attributes:

for: used for the object name to which the calculation result is to be synchronized.

form: Used to specify which form element to use. If any form element is specified, it will accept the form item it is in.

name: refers to the name of the element.

    <form onsubmit="return false" oninput="result.value = parseInt(s1.value) + parseInt(s2.value)">
        <input name="s1" type="range"> +
        <input name="s2" type="range"> =
        <output name="result"></output>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: