开发者

Displaying Images in Tumb Nails format in JSP

In my JSP Page , i am displying a single Image as shown .

<img src="http://your_host/servlet/BannerServlet?config_file"  width=125 height=125>

This works fine when i display a Single Image , but开发者_运维技巧 what if i want to display a number of images (Like ThumbNails of Images displayed in porno sites )

Please tell me


If you need to display several images, you need to have several <img/> tags, each with a different src attribute.

It's not a good idea to use the real image just to display its thumbnail (using smaller width and height attributes), because it wastes bandwidth and takes more time: it forces the browser to download a big image (hundreds of KBs) instead of a small one (some KBs). So reduce your images and store two copies on the server: the thumbnail and the actual image.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜