gpt4 book ai didi

javascript - 使用 JavaScript 通过 https 提供图像

转载 作者:太空宇宙 更新时间:2023-11-03 15:13:39 25 4
gpt4 key购买 nike

我有一个安装了 apache 网络服务器的 Amazon ec2 实例。我已经使用 Certbot 安装了 SSl 证书。我想使用 javascript 在我的网站上显示图像。当用户输入编辑文本框时,我想动态更改图像。我目前正在使用 javascript 来更改它。当我访问图像时,我收到此消息“请求不安全的图像‘http://myurl.jpg’。此内容也应通过 HTTPS 提供。如何使用 Https 提供图像?

document.getElementById("img").src="http://myurl.jpg"

最佳答案

替换为:“http://myurl.jpg”有了这个:“https://myurl.jpg

够简单吗?

关于javascript - 使用 JavaScript 通过 https 提供图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40296148/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com