📜  HTML | DOM 输入日期时间类型属性

📅  最后修改于: 2021-11-06 11:46:13             🧑  作者: Mango

输入日期时间类型属性用于返回日期时间字段的表单元素类型。
输入日期时间类型属性返回一个字符串,该字符串表示日期时间字段的表单元素类型。
结果,Safari 和 Opera 等浏览器返回“日期时间”,而 Internet Explorer、Firefox 和 Chrome 等浏览器返回“文本”。

句法:

datetimeObject.type

返回值:它返回一个字符串值,表示日期时间字段的表单元素的类型

下面的程序说明了日期时间类型属性:
返回日期时间字段的表单元素类型。

html


 

    Input Datetime type Property in HTML
    

 

 
    

GeeksforGeeks

    

Input Datetime type Property

    
Date Of Birth:             

To find out the type of form element the datetime field is,       double-click the "Check Type" button.

               

            


输出:
点击按钮前:

点击按钮后:

支持的网络浏览器:

  • 苹果Safari
  • IE浏览器
  • 火狐
  • 谷歌浏览器
  • 歌剧