ã¡ã¢: ãã®æ©è½ã¯ã¦ã§ãã¯ã¼ã«ã¼å ã§å©ç¨å¯è½ã§ãã
webkitRelativePath
㯠File
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®èªã¿åãå°ç¨ããããã£ã§ãwebkitdirectory
屿§ãè¨å®ããã <input>
è¦ç´ ã«ããã¦ãã¦ã¼ã¶ã¼ã鏿ãããã£ã¬ã¯ããªã¼ã«å¯¾ãããã¡ã¤ã«ã®ãã¹ãæå®ããæååãä¿æãã¾ãã
ã¦ã¼ã¶ã¼ã鏿ããç¥å ãã£ã¬ã¯ããªã¼ãåºæºã«ãããã¡ã¤ã«ã®ãã¹ãå«ãæååã
ä¾ãã®ä¾ã§ã¯ãã¦ã¼ã¶ã¼ã 1 ã¤ã¾ãã¯è¤æ°ã®ãã£ã¬ã¯ããªã¼ã鏿ãããã¨ãã§ãããã£ã¬ã¯ããªã¼ããã«ã¼ã表示ããã¾ãã change
ã¤ãã³ããçºçããã¨ã鏿ããããã£ã¬ã¯ããªã¼é層ã«å«ã¾ãããã¹ã¦ã®ãã¡ã¤ã«ã®ãªã¹ããçæããã表示ããã¾ãã
<input type="file" id="filepicker" name="fileList" webkitdirectory multiple />
<output id="output"></output>
output {
display: block;
white-space: pre-wrap;
}
JavaScript
const output = document.getElementById("output");
const filepicker = document.getElementById("filepicker");
filepicker.addEventListener("change", (event) => {
const files = event.target.files;
for (const file of files) {
output.textContent += `${file.webkitRelativePath}\n`;
}
});
çµæ 仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§ é¢é£æ
å ±
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4