Input Week typeProperty

Input Week 对象参考手册Input Week Object

Examples

Return the form type of the week field:

var x = document.getElementById("myWeek").type;

xThe output value is:

week

Try it Yourself »

Definition and Usage

The type property returns the form element type of the week field.

Note:In the above examples, Opera, Chrome, and Safari browsers return "week", but Internet Explorer and Firefox browsers return "text".


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type property.

Note:Internet Explorer or Firefox browsers do not support the `<input type="week">` element.


Syntax

weekObject.type

Technical Details

Return Value: A string, representing the form element type of the week field.


Input Week 对象参考手册Input Week Object Other Extensions