当前位置:   article > 正文

angular监听鼠标,键盘事件_keyboardevent istrusted

keyboardevent istrusted

关键词:$event

监听鼠标事件
  <button (click)="onClick($event)"></button>

$event 输出: MouseEvent {isTrusted: true, screenX: 395, screenY: 541, clientX: 284, clientY: 383, …}

监听键盘事件
 <input (keydown.enter)= "onEnter($event)" type="text">

$event 输出:KeyboardEvent {isTrusted: true, key: "Enter", code: "Enter", location: 0, ctrlKey: false, …}

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/222854
推荐阅读
相关标签
  

闽ICP备14008679号