menu
more_vert
js 下载远程图片

作者:dayu

<input type="hidden"value="https://www.baidu.com/img/bd_logo1.png">
</body>
<script type="text/javascript">
$(‘#down‘).click(function(){
var url = $(‘#url‘).val();
var $a = $("<a></a>").attr("href", url).attr("download", "img.png");
$a[0].click();
});
</script>
</html>

js 下载远程图片

原文地址:http://www.cnblogs.com/hexuejuan/p/7207272.html



Processed Time:0.26110291481018

_REQUEST:
Array
(
    [0] => read
    [1] => 95545
)
_SESSION:
Array
(
    [fid] => 4
)