javascript - 获取外部url图片

标签 javascript jquery html image get-request

我想获取外部 URL 的 images[] 数组。我能够使用 $.ajax 检索页面的实际源代码,但我不知道如何访问图像。 谢谢。

最佳答案

你可以做类似的事情

var images = [];
$(pagecode).find('img').each(function(){
   images.push( this.src );
});

关于javascript - 获取外部url图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8534557/

相关文章:

javascript - jqGrid 可以优雅地降级吗?

javascript - 我们不应该使用 <noscript> 元素吗?

javascript - 存在滚动条时,为什么 clientWidth 和 offsetWidth 的值相同?

jquery - 轨道 5 : handling error messages with rails-ujs and jquery

javascript - stopPropagation 似乎没有按预期工作

html - CSS 中水平到垂直的子菜单

javascript - jQuery sortable 将内容下推

javascript - Instagram 风格的帖子标题固定在页面顶部,然后被下一个替换

javascript - 如何从异步调用返回响应?

html - 为什么我的外语(马拉雅拉姆语)字符在数据库中存储为 html 字符