This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

type

Property of dom/Elementdom/Element

Syntax

var result = element.type;
element.type = value;

Examples

This example uses the type property to create an alert that indicates the type of object selected by the user. If the user clicks the mouse pointer on the text "Some text", the alert reads "Text". If the user clicks the mouse pointer on the space to the right of the text, the alert reads "None".

<BODY onclick="alert(document.selection.type)">
Some text.

Notes

Remarks

Selection is a child object of the Document object.

Syntax

See also

Related pages

Attributions