diff options
author | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-12-31 21:21:17 +0900 |
---|---|---|
committer | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2022-01-11 11:49:44 +0900 |
commit | 36eb7d19909f719191376481da6b121ec6272c65 (patch) | |
tree | 9d8db7a68d910ddc4b4c9aba5d9c74a09af30b32 /files/ja/web/api/mouseevent/altkey/index.md | |
parent | 09caa137e715c2c8d74df68b2f325186225219e6 (diff) | |
download | translated-content-36eb7d19909f719191376481da6b121ec6272c65.tar.gz translated-content-36eb7d19909f719191376481da6b121ec6272c65.tar.bz2 translated-content-36eb7d19909f719191376481da6b121ec6272c65.zip |
Web/API/MouseEvent 以下の文書を更新準備
Diffstat (limited to 'files/ja/web/api/mouseevent/altkey/index.md')
-rw-r--r-- | files/ja/web/api/mouseevent/altkey/index.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/files/ja/web/api/mouseevent/altkey/index.md b/files/ja/web/api/mouseevent/altkey/index.md new file mode 100644 index 0000000000..ffa370b596 --- /dev/null +++ b/files/ja/web/api/mouseevent/altkey/index.md @@ -0,0 +1,45 @@ +--- +title: event.altKey +slug: Web/API/MouseEvent/altKey +tags: + - DOM + - Gecko + - Gecko DOM Reference +translation_of: Web/API/MouseEvent/altKey +translation_of_original: Web/API/event.altKey +--- +<p>{{ ApiRef() }}</p> +<h3 id="Summary" name="Summary">Summary</h3> +<p>イベントが発生したときALTキーが押されていたかどうかを示します。</p> +<h3 id="Syntax" name="Syntax">Syntax</h3> +<pre class="eval"><i>bool</i> = event.altKey +</pre> +<p><code>bool</code> は <code>true</code> か <code>false</code> であり、イベントが発生したときに ALT キーが押されていたかどうかを示しています。</p> +<h3 id="Example" name="Example">Example</h3> +<pre><html> +<head> +<title>altKey example</title> + +<script type="text/javascript"> + +function showChar(e){ + alert( + "Key Pressed: " + String.fromCharCode(e.charCode) + "\n" + + "charCode: " + e.charCode + "\n" + + "ALT key pressed: " + e.altKey + "\n" + ); +} + +</script> +</head> + +<body onkeypress="showChar(event);"> +<p> +Press any character key, +with or without holding down the ALT key.<br /> +You can also use the SHIFT key together with the ALT key. +</p> +</body> +</html> +</pre> +<p>{{ languages( { "en": "en/DOM/event.altKey", "pl": "pl/DOM/event.altKey" } ) }}</p> |