此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in English Always switch to English

File.fileName

Baseline
Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

Non-standard: 此功能尚未標準化。我們不建議在生產環境中使用非標準功能,因為它們的瀏覽器支援有限,且可能變更或被移除。然而,在沒有標準選項的特定情況下,它們可以作為合適的替代方案。

總覽

回傳檔案名稱,基於安全因素,檔案路徑不包含這個屬性。

備註:這個檔案是廢棄的,使用 File.name 取代。

語法

js
var name = instanceOfFile.fileName;

數值

字串

格式

尚無資料

看更多