HTML5< input type =“date”> - onChange事件 [英] HTML5 <input type=“date”> - onChange Event
本文介绍了HTML5< input type =“date”> - onChange事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以在事件 onChange
中检测< input type =date>
,当用户时使用图形日历和箭头或使用键盘号?
Is possible to detect in event onChange
for <input type="date">
, when user using graphical calendar and arrows or using keybord number?
我只对VanillaJS中的解决方案感兴趣。
I am only interested solutions in VanillaJS.
推荐答案
这样的事情?
function handler(e){
alert(e.target.value);
}
<input type="date" id="dt" onchange="handler(event);"/>
这篇关于HTML5< input type =“date”> - onChange事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文