开发者

Jquery find all images on a website link

I'm trying to create an jquery "inside" bookmarklet to my website l开发者_JAVA技巧ike facebook share.

I need to get all images on a link. I mean if I give www.domain.com in my form, ajax request is needed to get all image links in that webpage and images should be shown in the form to select by user.

I'm sure there is a jquery plugin in order to do this, but I couldn't find any. I hope anyone can help me with this.


You can do this for the actual site where the script will reside. The following code will get you all images.

$('img')

I mean if I give www.domain.com in my form, ajax request is needed to get all image links in that webpage and images should be shown in the form to select by user.

No, you can't do this for a remote site. It's restricted by the same origin policy. You would be able to do this if you fetched the remote page with a server side handler on the same domain jQuery code will reside.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜