HTML - 如何在img标签中显示本地数据? [英] HTML - how to display local data in img tag?

查看:625
本文介绍了HTML - 如何在img标签中显示本地数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可编辑的div,用户可以粘贴从Office Word复制的图片。这样做后,可以在源代码中看到一个图像标记,但路径不再工作。如果我只是输入源链接到浏览器,我可以看到的图像。如何修改链接以使其工作?

I have an editable div and a user can paste a picture copied from Office Word. After doing so an image-tag can be seen in the source code, but the path does not work anymore. If I just enter the source link into to the browser, I can see the image. How to modify the link to make it work?

HTML

<img src="file:///C:/Users/myname/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg" v:shapes="Grafik_x0020_1">


推荐答案

相互作用。浏览器不允许,因为这将是很大的安全缺陷。

You can't open local file in site without user interaction. Browser won't allow that, because it would be great security flaw.

这篇关于HTML - 如何在img标签中显示本地数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆