本文介绍了为什么仅在粘贴到BROWSER的地址栏中时显示图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将以下选项(1-4)之一放到页面上并加载它时,没有显示图片.
但是,当我将路径之一放入任何浏览器的地址栏(IE,FF,Chrome ..)时,浏览器便会显示图片.

为什么在加载页面时未显示图片,但如果将路径粘贴到BROWSER的地址栏中则显示DO?

1:< img alt =" src ="D:\ images \ img.png"/>
2:< img alt =" src ="D:/images/img.png"/>
3:< img alt =" src ="ftp://d:/images/img.png"/>
4:< img alt =" stc ="ftp://d:\ images \ img.png"/>



谢谢您.

When I tried to put one of the options below(1-4) to the page and load it, no pictured is shown.
But, when I put one of the paths to any browser''s address bar(IE,FF, Chrome..), so the browser DOES show the picture.

Why the picture isn''t shown when the page is loaded but DO shown if the path is pasted to BROWSER''s address bar?

1: <img alt="" src="D:\images\img.png" />
2: <img alt="" src="D:/images/img.png" />
3: <img alt="" src="ftp://d:/images/img.png" />
4: <img alt="" stc="ftp://d:\images\img.png" />



Thank you

推荐答案



src="..\images\img.png"  



当然,这是相对于您的html文档而言的.

或文件:前缀:



this is relative to your html document of course...

or the file: prefix:

src="file://D:/images/img.png" 



瓦莱里.



Valery.


这篇关于为什么仅在粘贴到BROWSER的地址栏中时显示图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 21:47
查看更多