document.onkeydown = function (event) {console.log(event)}
if (document.activeElement.id === 'txtEndTime') {
$('#txtEndTime').val('');
} else if (document.activeElement.id === 'txtStartTime') {
$('#txtStartTime').val('');
}
document.onkeydown = function (event) {console.log(event)}
if (document.activeElement.id === 'txtEndTime') {
$('#txtEndTime').val('');
} else if (document.activeElement.id === 'txtStartTime') {
$('#txtStartTime').val('');
}
转载于:https://www.cnblogs.com/jooucks/p/7053161.html