如何链接图像。 [英] How do I link images.

查看:75
本文介绍了如何链接图像。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,



我想知道如何将图像从1个网站链接到另一个网站,如果我从主网站更新图像,它会自动更新alt网站的图片。



例如;

主站点:Image1

Alt网站: Image1



我想将主图像1更改为图像2,但我希望Alt图像1自动更改为图像2.



非常感谢。



我尝试过:



将图像保存为相同名称,但问题是它会在当天结束时覆盖。

Good Morning,

Id like to know how to link images from 1 website to another, and if i update the image from the main website that it will automatically update the image for the alt websites.

For example;
Main Site: Image1
Alt Website: Image1

I want to change Main Image 1 to Image 2 but i want Alt image 1 to automatically change to Image 2.

Thank you very much.

What I have tried:

Saving the image as the same name, however the problem would be that it will override in the end of the day.

推荐答案

为什么你不能只需创建从源网站到目标网站的链接?如果他们更改了图像(并且其名称保持不变),那么它也只是简单地更新你的图像。



如果他们更新并且更改名称 - 然后你在黑暗中拍摄。如果你可以抓住他们的页面和屏幕抓取图像,那么你可以用他们的更新你的价值观。你需要一些方法来区分图像。如果在 DOM 中,并且页面上没有任何内容更改位置,那么您可以通过这种方式获取列表(迭代所有< img>实体的数组。如果他们有ID,那么生活会更容易(除非这些改变也是如此。



如果遥控器不在您的控制范围内 - 您只能希望。如果它在您的控制范围内,那么您可以提前得到答案。


Why can you not simply create the link from the source website to the target website? If they change the image (and its name remains the same) then it will just simply update yours, too.

If they update and change the name - then you're shooting in the dark. If you can grab their page and screen-scrape for the images then you can update your values with theirs. You'll need some way to tell the images apart. If in DOM, and nothing on the page changes location, then you can get the list that way (iterating the array of all <img> entities. If they had ID's then life would be easier (unless those change, too).

If the remote is out of your control - you can only hope. If it's in your control, then you have the answers in advance.


这篇关于如何链接图像。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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