Viewing Images
A useful tool for designers is the ability to view all the images on a page, apart from the layout of the page. Script 17.7 allows you to peek behind the scenes of someone else’s page and see a list of the page’s individual images, the height and width of the images (in modern browsers), and their URLs.
To view images:
1. | var iWin,i,t='',di=document.images; |
2. | for (i=0;i<di.length;i++){ |
3. | if(t.indexOf(di[i].src)<0){ |
Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.