开发者

get the ful imagepath for any image on the web

If I get any image tag from any website I want to be able to get the full path to the image file.

eg:

src="http://www.example.c开发者_开发技巧om/images/foo.gif" //This is fine

src="images/foo.gif"

src="/images/foo.gif"

for the bottom two src attributes, how can i get the full image path? I want to treat the src attribute universally and always get the full path of an image.


if you have the url of the page that holds the image, and the url of the image, you can use new Uri(pageUri, imageUri) to combine the urls and get the full url

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜