angular监听鼠标,键盘事件

关键词:$event

监听鼠标事件

  

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

监听键盘事件

 

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

你可能感兴趣的:(angular监听鼠标,键盘事件)