aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/htmlinputelement/multiple/index.html
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/htmlinputelement/multiple/index.html
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/htmlinputelement/multiple/index.html')
-rw-r--r--files/ja/web/api/htmlinputelement/multiple/index.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/files/ja/web/api/htmlinputelement/multiple/index.html b/files/ja/web/api/htmlinputelement/multiple/index.html
new file mode 100644
index 0000000000..a95fa672b3
--- /dev/null
+++ b/files/ja/web/api/htmlinputelement/multiple/index.html
@@ -0,0 +1,38 @@
+---
+title: HTMLInputElement.multiple
+slug: Web/API/HTMLInputElement/multiple
+translation_of: Web/API/HTMLInputElement/multiple
+---
+<div>{{ APIRef("HTML DOM") }}</div>
+
+<p><strong><code>HTMLInputElement.multiple</code></strong>は<code>input</code>タグが複数の値を持つことができるかどうかを示すプロパティです。現在Firefoxでは、<strong>multiple</strong>属性は<code>&lt;input type="file"&gt;</code>でのみサポートされています。</p>
+
+<h2 id="例">例</h2>
+
+<pre class="brush:js">// fileInputは&lt;input type=file multiple&gt;であるようなHTML要素です
+var fileInput = document.getElementById("myfileinput");
+
+if (fileInput.multiple == true) {
+
+ for (var i = 0, len = fileInput.files.length; i &lt; len; i++) {
+ // fileInput.filesをループ
+ }
+
+// 一つのファイルのみが有効な場合
+} else {
+ var file = fileInput.files.item(0);
+}
+</pre>
+
+<h2 id="関連情報">関連情報</h2>
+
+<ul>
+ <li><a href="/en/DOM/FileList" title="en/DOM/FileList">FileList</a></li>
+ <li><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=523771" title="https://bugzilla.mozilla.org/show_bug.cgi?id=523771">Bug 523771</a> - <span class="bz_default_hidden" id="summary_alias_container" style="display: inline;"> <span id="short_desc_nonedit_display">Support &lt;input type=file multiple&gt;</span> </span></li>
+</ul>
+
+<h2 id="仕様">仕様</h2>
+
+<ul>
+ <li><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-multiple" title="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-multiple">The multiple attribute</a> (HTML 5 working draft)</li>
+</ul>