Input Time form eigenschap

Definitie en gebruik

form De eigenschap retourneert een verwijzing naar het formulier dat de tijdveld bevat.

Deze eigenschap retourneert het formulierobject bij succes.

Opmerking:Deze eigenschap is alleen lezen.

Voorbeeld

Geef de id van het formulier terug dat de <input type="time">-element bevat:

var x = document.getElementById("myTime").form.id;

Probeer het zelf

Syntax

timeObject.form

Technical details

Return value: Reference to form elements containing time fields. If the time field is not in the form, it returns null.

Browser support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 10.0 Support Support Support

Note:The <input type="time"> element does not display as any time field in Firefox.