0
我有一个网页,其中包括数以千计的图像10。有时图像不可用,因此在客户端浏览器中显示损坏的图像。用jQuery或JavaScript代替破碎的图像
破碎的图像采用以下URL格式:www.domain.com/t.php?src=p/dd5e5b08_1.jpg。
如何使用jQuery获取图像集,将其过滤为损坏的图像,然后替换src
?
下不起作用:
的收盘价要高于</head>
标签
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
的收盘价要高于标签
<script type="text/javascript">
$(window).load(function() {
$("img").each(function(){
var image = $(this);
if(image.context.naturalWidth == 0 || image.readyState == 'uninitialized'){
$(image).unbind("error").attr("src", "/images/no_image.png");
}
});
});
</script>
你怎么动态 user2110535 2013-04-26 07:09:22
get image on php variable and use it like this: 2013-04-26 07:13:31
什么是'退货TRUE'? – 2013-09-24 17:41:17