我无法显示具有绝对路径的图像: [英] I cannot display an image with an absolue path :
本文介绍了我无法显示具有绝对路径的图像:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< img src =file:///这是我的代码,为什么不能使用这个图片: C:/Users/myname/Documents/WWWDIR/resources/files/users/logo.jpgalt =photo2border =0/>
我只能看到替代文字,但我可以在萤火虫中看到图像。
有什么想法?
解决方案
如果这是来自远程( http://
)页面,这是有意设计的:您无法再链接到现代浏览器中远程页面的本地资源。查看每个浏览器的详细信息此处。
here is my code, why cant i disaply this image :
<img src="file:///C:/Users/myname/Documents/WWWDIR/resources/files/users/logo.jpg" alt="photo2" border="0"/>
i see only the alt text, but i am able to see the image in firebug. any idea?
解决方案
If this is from a remote (http://
) page, it is by design: You can't link to local resources from remote pages in modern browsers any more. See details for each browser here.
这篇关于我无法显示具有绝对路径的图像:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文