Javascript getElementById()在输入类型时间内不工作

Javascript getElementById()在输入类型时间内不工作,javascript,html,Javascript,Html,为什么下面的代码不返回值 <input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable"> 打印“” 为什么下面的代码不返回值 <input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable"> 因为输入元素没有inner

为什么下面的代码不返回值

<input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable">
打印“”

为什么下面的代码不返回值

<input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable">
因为输入元素没有
innerHTML
,所以它们有

var hora = document.getElementById('hora').value; 
console.log(hora);
为什么下面的代码不返回值

<input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable">
因为输入元素没有
innerHTML
,所以它们有

var hora = document.getElementById('hora').value; 
console.log(hora);
为什么下面的代码不返回值

<input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable">
因为输入元素没有
innerHTML
,所以它们有

var hora = document.getElementById('hora').value; 
console.log(hora);
为什么下面的代码不返回值

<input type="time" id="hora" style="margin: 0 auto;" class="button button-block button-stable">
因为输入元素没有
innerHTML
,所以它们有

var hora = document.getElementById('hora').value; 
console.log(hora);

没问题,很高兴它有帮助。没问题,很高兴它有帮助。没问题,很高兴它有帮助。没问题,很高兴它有帮助。