HTML <input type = "month">
例
月と年のコントロールを定義します(タイムゾーンなし):
<label for="bdaymonth">Birthday (month and year):</label>
<input type="month"
id="bdaymonth" name="bdaymonth">
定義と使用法
月と年の<input type="month">
コントロールを定義します。
形式は「YYYY-MM」です。
ヒント:<label>
アクセシビリティのベストプラクティスのために、常にタグを追加してください。
ブラウザのサポート
表の数字は、要素を完全にサポートする最初のブラウザバージョンを示しています。
Attribute | |||||
---|---|---|---|---|---|
type="month" | 25.0 | 12.0 | Not supported | Not supported | 10.1 |
構文
<input type="month">