简体   繁体   English

如何在HTML中嵌入图像(不使用LinkedResource或CDO)

[英]How to embed image inside HTML (not using LinkedResource or CDO)

Here is situation: I want to create HTML document with embeded image something like this: 下面是这样的情况:我想用嵌入式图像创建HTML文档,如下所示:

<html>
 <head>
 </head>
 <body>
  <img src="?" />
 </body>
</html>

Where "?" 哪里“?” could somehow point to embeded image data. 可以某种方式指向嵌入图像数据。 Maybe if javascript could decode base64 string generated by .net it could get me closer to my goal... This document is generated on the fly and submited to document system. 也许如果javascript可以解码.net生成的base64字符串,它可以让我更接近我的目标...这个文档是动态生成的并且提交给文档系统。 So I can not use any external link to the image using LinkedResource. 所以我不能使用LinkedResource使用任何外部链接到图像。

You should check out the MHTML format. 你应该看看MHTML格式。 It is used to combine HTML with embedded resources. 它用于将HTML与嵌入式资源相结合。

http://en.wikipedia.org/wiki/MHTML http://en.wikipedia.org/wiki/MHTML

Make sure to take a look at the browsers supporting the format. 请务必查看支持该格式的浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM