我想通过上得到IMG负载错误,但它不工作绑定工作,但在不工作
$(document).on("error","#someid img",
function(){
console.log("Image load error through On");
});
但“绑定”
$("#someid img").bind("error", function() {
console.log("Image load error through bind");
});
文档中的jquery的版本是什么? –
我有1.7.1的版本 –
你使用的是什么版本的jQuery? .on()方法在jQuery 1.7中添加。 – Flea777