KeyboardEvent: constructor KeyboardEvent()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Constructor KeyboardEvent() tạo một đối tượng unsupported templ: domxref("keyboardevent")} mới. ## cú pháp ```js_nolint new keyboardevent(type) new keyboardevent(type, options) ``` ### tham số _ `type` _ : một chuỗi với tên của sự kiện. nó phân biệt chữ hoa chữ thường và trình duyệt đặt nó thành `keydown`, `keyup`, hoặc `keypress`. _ `options` {{

Giá trị trả về

Một đối tượng unsupported templ: domxref("keyboardevent")} mới. ## Đặc điểm kỹ thuật {{

Tương thích trình duyệt

Xem thêm

  • KeyboardEvent, giao diện của các đối tượng mà nó xây dựng.