如何处理img标签和其他标签上的onLoad事件 [英] how to handle onLoad Event on img tag and others

查看:305
本文介绍了如何处理img标签和其他标签上的onLoad事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何处理img标签上的onLoad事件?

how to handle onLoad Event on img tag?

示例:

$ ('img'). onload (function (e) {
   alert ('image loaded' + $ (this), attr ('src'));
})

就像imageLoader

is like the imageLoader

以及其他标签,例如脚本,链接等...

and others tags like script, link, etc...

推荐答案

似乎对我有用,应该通过缓存解决此警告.

Seems to work for me, and should fix the caveat with caching.

这篇关于如何处理img标签和其他标签上的onLoad事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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