我尝试使用JDenticon API (请参阅JDenticon API)来使用Javascript生成一个同义词,并将图片显示在一个基本的HTML上。之后,我想使用Java获取图像。但是现在我只想把图像显示在HTML文档上。
这是我的test.html的代码
<!DOCTYPE HTML>
<html>
<head>
<title>Test</title>
</head>
<body>
<script src="//cdn.jsdelivr.net/jdenticon/1.3.2/jdenticon.min.js" async></script>
<canvas width="200" height="200" data-jdenticon-hash="ff8adece0631821959f443c9d956fc39">
Fallback text for browsers not supporting canvas</canvas>
<svg width="200" height="200" data-jdenticon-hash="ff8adece0631821959f443c9d956fc39">
Fallback text for browsers not supporting inline svg</svg>
</body>
</html>但是,当在火狐中查看test.html时,没有图片,为什么呢?我觉得我错过了一些很重要的东西,但我不知道它是什么。
发布于 2016-07-04 12:54:50
您错过了https:
<!DOCTYPE HTML>
<html>
<head>
<title>Test</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/jdenticon/1.3.2/jdenticon.min.js" async></script>
<canvas width="200" height="200" data-jdenticon-hash="ff8adece0631821959f443c9d956fc39">
Fallback text for browsers not supporting canvas</canvas>
<svg width="200" height="200" data-jdenticon-hash="ff8adece0631821959f443c9d956fc39">
Fallback text for browsers not supporting inline svg</svg>
</body>
</html>
https://stackoverflow.com/questions/38184109
复制相似问题