如何将iframe src设置为本地文件

时间:2010-08-25 23:24:18

标签: iframe google-chrome

我的HTML中有一个iframe,我想从本地文件夹中播放mpeg / mpg文件,但我无法将视频加载到iframe中。当我设置src =“http://www.google.com”时,它会显示在iframe中,但是如果我尝试src =“file:/// C:/ Documents%20和%20Settings / jgabotero / Desktop / sample .JPG” 它不显示图像。

如何设置iframe的src属性指向本地文件,特别是存储在IsolatedStorage中的文件?

提前谢谢。

- 朱莉

1 个答案:

答案 0 :(得分:1)

我认为您无法使用file://安全问题在iframe中显示文件形式。

我还认为你无法在iframe中显示图像,即html或ohp页面,所以将图像放在html文件中,并将iframe链接到这个html文件。