aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/mouseevent/altkey/index.md
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-12-31 21:21:17 +0900
committerMasahiro FUJIMOTO <mfujimot@gmail.com>2022-01-11 11:49:44 +0900
commit36eb7d19909f719191376481da6b121ec6272c65 (patch)
tree9d8db7a68d910ddc4b4c9aba5d9c74a09af30b32 /files/ja/web/api/mouseevent/altkey/index.md
parent09caa137e715c2c8d74df68b2f325186225219e6 (diff)
downloadtranslated-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.md45
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>&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;altKey example&lt;/title&gt;
+
+&lt;script type="text/javascript"&gt;
+
+function showChar(e){
+ alert(
+ "Key Pressed: " + String.fromCharCode(e.charCode) + "\n"
+ + "charCode: " + e.charCode + "\n"
+ + "ALT key pressed: " + e.altKey + "\n"
+ );
+}
+
+&lt;/script&gt;
+&lt;/head&gt;
+
+&lt;body onkeypress="showChar(event);"&gt;
+&lt;p&gt;
+Press any character key,
+with or without holding down the ALT key.&lt;br /&gt;
+You can also use the SHIFT key together with the ALT key.
+&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+<p>{{ languages( { "en": "en/DOM/event.altKey", "pl": "pl/DOM/event.altKey" } ) }}</p>