如何从当前网址获取图像[关闭]

问题描述 投票:-3回答:1

我网站上的网址页面,如果添加(?Img = // i.mysite.com/image.png)要变成这样(www.mysite.com?Img = https:// i.mysite.com/ image.png),我要提取第二部分,这是图像链接

<img id="img" src=" "   >

<script>
      document.getElementById("img").src =  code;
    </script>
javascript php image url
1个回答
0
投票
document.getElementById('code!!').src = "www.mysite.com/page?img=//i.mysite.com/image.png/"
© www.soinside.com 2019 - 2024. All rights reserved.