< IMG /> LowSrc属性+事件? [英] <IMG/> LowSrc attribute + events?

查看:209
本文介绍了< IMG /> LowSrc属性+事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < IMG SRC =pete.jpgLOWSRC =pete2.jpgWIDTH = 364 HEIGHT = 500> 

(低品质版本pete2.jpg是7,401字节
高品质版本,pete.jpg,是48,952字节。)



我想先显示 lowsrc



然后在完成加载后,开始在后台加载真实的src。



想要同时显示进度条。但为了隐藏/显示进度条 - 我需要 2 个事件。

  event  - >显示进度条
当SRC加载事件 - >隐藏进度条

如何捕获 LOAD 事件 lowsrc && src



编辑



< =http://www.flickr.com/photos/dougneiner/6871497481/in/photostream/lightbox/>此网址



转发图片 - 和fiddler我看到有2个图像。一个小一个大。



但这使我搜索并找到 lowsrc attr。



这也可以帮助这里....

解决方案

web, lowsrc 不再受现代浏览器支持。至少在Chrome 18 / Windows 7上,它似乎被完全忽略。



它从来不是HTML4的一部分,也不是HTML5 ,虽然据说它仍然是支持由Gecko浏览器(我没有测试这个)。



您最好的赌注是使用两个图像,如Flickr。


< IMG SRC="pete.jpg" LOWSRC="pete2.jpg" WIDTH=364 HEIGHT=500>

(The low quality version, pete2.jpg, is 7,401 bytes. The high quality version, pete.jpg, is 48,952 bytes.)

I want to show first the lowsrc.

then after it finishes loading , start loading in the background the real src.

I want to display a progress bar meanwhile. but in order to hide/display the progress bar - i need 2 events.

when LOWSRC  load event -> show progress bar
when SRC   load event -> hide progress bar

how can i capture the LOAD event both for lowsrc && src

edit

ive tested this url

and fast-forwarded the pictures - and by fiddler i saw there are 2 images. one small and one big.

but this made me search and find the lowsrc attr.

which can also help here....

解决方案

According to various sources around the web, lowsrc is no longer supported by modern browsers. At least on Chrome 18 / Windows 7, it seems to get ignored completely.

It's never been part of HTML4, nor of HTML5, although supposedly it's still supported by Gecko browsers (I did not test this).

Your best bet is to use two images, like Flickr does.

这篇关于&lt; IMG /&gt; LowSrc属性+事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆