Skip to content

Instantly share code, notes, and snippets.

@wgkoro
Created October 6, 2014 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wgkoro/24ec847ef31bf771606f to your computer and use it in GitHub Desktop.
Save wgkoro/24ec847ef31bf771606f to your computer and use it in GitHub Desktop.
キーコードを確認するためのHTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(function(){
$('#target').on({
keyup : function(e){
$('#code').val(e.keyCode);
}
});
});
</script>
</head>
<body>
<textarea id='target'></textarea><br>
keycode: <input type='text' id='code'>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment