aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/mouseevent/altkey
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/mouseevent/altkey
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/mouseevent/altkey')
-rw-r--r--files/ja/web/api/mouseevent/altkey/index.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/files/ja/web/api/mouseevent/altkey/index.html b/files/ja/web/api/mouseevent/altkey/index.html
new file mode 100644
index 0000000000..9316f58644
--- /dev/null
+++ b/files/ja/web/api/mouseevent/altkey/index.html
@@ -0,0 +1,44 @@
+---
+title: event.altKey
+slug: Web/API/MouseEvent/altKey
+tags:
+ - DOM
+ - Gecko
+ - Gecko DOM Reference
+translation_of: Web/API/MouseEvent/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>