Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用html/jquery从url下载图像_Javascript_Jquery_Html - Fatal编程技术网

Javascript 使用html/jquery从url下载图像

Javascript 使用html/jquery从url下载图像,javascript,jquery,html,Javascript,Jquery,Html,我试图显示一个JSON文件中的图像,它是动态变化的。然而,这个url似乎拒绝了通过iFrame进行热链接和显示图像的权限。我从以下错误中得出这个结论: Refused to display 'http://www.gosugamers.net/uploads/images/teams/10649-1422301535.jpeg' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. http://www.gosugamers.

我试图显示一个JSON文件中的图像,它是动态变化的。然而,这个url似乎拒绝了通过iFrame进行热链接和显示图像的权限。我从以下错误中得出这个结论:

Refused to display 'http://www.gosugamers.net/uploads/images/teams/10649-1422301535.jpeg' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

http://www.gosugamers.net/uploads/images/teams/10649-1422301535.jpeg Failed to load resource: the server responded with a status of 403 (Forbidden)
我的问题是如何使用html/jquery下载图像而不占用太多内存,因为每次用户访问此页面时,它都会下载图像

这就是我到目前为止所尝试的

image1.html('<iframe  src="http://www.gosugamers.net/' + m['team 1']['image'] + '" name="imgbox" id="imgbox"></iframe>')
image1.html('<img class="team1" src="http://www.gosugamers.net/' + m['team 1']['image'] + '">')
image1.html(“”)
image1.html(“”)

我不知道你的情况。。。但它是有效的。我真的不明白!我已清除浏览器中的缓存,但它仍不显示图像。。。