<html>
<body>
datetime 字段: <input type="datetime" id="myDatetime">
<p>点击按钮返回 datetime 字段的表单元素类型。</p>
<button onclick="myFunction()">点我</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myDatetime").type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>