aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/file/name/index.html
blob: 0aa67a837420d3193a099e0cfa09656a566c5723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: File.name
slug: Web/API/File/name
tags:
  - API
  - File API
  - Property
  - Reference
  - 파일
translation_of: Web/API/File/name
---
<div>{{APIRef("File API")}}</div>

<p><strong><code>name</code></strong> 속성은 {{domxref("File")}} 객체가 나타내는 파일의 이름을 반환합니다. 보안상의 이유로 경로는 이름에서 제외됩니다.</p>

<h2 id="값"></h2>

<p><code>"My Resume.rtf"</code>와 같이 경로가 없는 파일의 이름을 포함하는 문자열입니다.</p>

<h2 id="예제">예제</h2>

<pre class="brush: html">&lt;input type="file" multiple onchange="processSelectedFiles(this)"&gt;
</pre>

<pre class="brush: js">function processSelectedFiles(fileInput) {
  var files = fileInput.files;

  for (var i = 0; i &lt; files.length; i++) {
    alert("Filename " + files[i].name);
  }
}</pre>

<p>아래에서 결과를 확인해보세요.</p>

<p>{{ EmbedLiveSample('예제', 300, 50) }}</p>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('File API', '#file-attrs', 'name')}}</td>
   <td>{{Spec2('File API')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<div>


<p>{{Compat("api.File.name")}}</p>
</div>

<h2 id="같이_보기">같이 보기</h2>

<ul>
 <li><a href="/ko/docs/Web/API/File/Using_files_from_web_applications">웹 어플리케이션에서 파일 사용하기</a></li>
</ul>