问题
I want to display a html file stored in local PC in another HTML. How do I do that? I tried using iframes and giving file:/// protocol. It gives me Not allowed to load local resource: error.
回答1:
In a Chrome App, to access local files / folders you need to use the chrome.fileSystem API and get the user to select the file/folder for you (works as access approval that you can retain for later).
You can't use file:///
from a Chrome App.
来源:https://stackoverflow.com/questions/37029737/how-to-display-html-file-stored-in-local-pc-from-chrome-app