HTML <input type =” month”>用於指定月份和年份字段的控件。該值的格式必須為“YYYY-MM”。
用法:
<input type="month">
例:
<!DOCTYPE html>  
<html>  
  
<head>  
    <title>  
        HTML input type month  
    </title>  
</head>  
  
<body style="text-align:center;">  
  
    <h1>GeeksForGeeks</h1>  
  
    <h2>HTML <Input type ="month"></h2>  
      
    <form id="myGeeks">  
        <input type="month" id="month_id"
                name="geeks" >  
    </form>  
</body>  
  
</html>                    輸出:

支持的瀏覽器:<input type =“ month”>支持的瀏覽器如下:
- 穀歌瀏覽器25.0
- Internet Explorer 12.0
- Opera 10.1
相關用法
- HTML DOM HTML用法及代碼示例
- HTML <html> xmlns屬性用法及代碼示例
- HTML <html>用法及代碼示例
- HTML scoped屬性用法及代碼示例
- HTML DOM lang用法及代碼示例
- HTML <section>用法及代碼示例
- HTML Style backgroundClip用法及代碼示例
- HTML Style borderTop用法及代碼示例
- HTML <th> valign屬性用法及代碼示例
- HTML <col> align屬性用法及代碼示例
- HTML Meter max用法及代碼示例
- HTML poster屬性用法及代碼示例
- HTML fullscreenerror事件用法及代碼示例
- HTML onvolumechange事件用法及代碼示例
- HTML Input Hidden value用法及代碼示例
- HTML onopen事件用法及代碼示例
- HTML Textarea autofocus用法及代碼示例
- HTML Style columnGap用法及代碼示例
- HTML Input Time autofocus用法及代碼示例
注:本文由純淨天空篩選整理自ManasChhabra2大神的英文原創作品 HTML | <input type=”month”>。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
