Partager via


ontimeerror Event

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Fires whenever a time-specific error occurs, usually as a result of setting a property to an invalid value.

Syntax

Inline HTML <ELEMENT ontimeerror = "handler(event);" >
attachEvent object.attachEvent( "ontimeerror", handler);
Named script <SCRIPT FOR = object EVENT = ontimeerror>

Event Information

Bubbles No
Cancels No
To invoke Set a time property, such as dur, to an invalid value.
Default action Calls the associated event handler.

Event Object Properties

Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query the event object for the following event properties.

Available Properties

srcElement Gets or sets the object that fired the event.
type Gets or sets the event name from the event object.

Refer to the specific event object for additional event properties.

Remarks

The ontimeerror event can only be set on the BODY. Use the FOR attribute of the script element to attach the ontimeerror event handler to the BODY.

<SCRIPT FOR="BODY" event="ontimeerror">
  alert("An HTML+TIME error has occurred.");
</SCRIPT>

Applies To

A, ABBR, ACRONYM, ADDRESS, AREA, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LEGEND, LI, LISTING, MARQUEE, MENU, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, selection, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

Introduction to HTML+TIME