本文介紹了如何查找特定密鑰的密鑰代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
查找特定按鍵的鍵碼最簡單的方法是什么?
What's the easiest way to find the keycode for a specific key press?
有沒有什么好的在線工具可以捕獲任何關鍵事件并顯示代碼?
Are there any good online tools that just capture any key event and show the code?
我想嘗試在帶有網絡瀏覽器的移動設備上查找特殊鍵的鍵碼,因此在線工具會很棒.
I want to try and find the key codes for special keys on a mobile device with a web browser, so an online tool would be great.
推薦答案
$(function () {
$(document).keyup(function (e) {
console.log(e.keyCode);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
這是您的在線工具.
這篇關于如何查找特定密鑰的密鑰代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!