替换破碎的图像??? [英] Replace Broken Images???

查看:70
本文介绍了替换破碎的图像???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定是否可以使用javascript完成此操作但是我想找到一种方法

来检测图像是否缺失并用默认图像替换它

可怕的RED X出现了。


所以 - Javascript是这样的吗?或者我应该在哪里看看?


提前致谢!

Not sure if this can be done with javascript but I would like to find a way
to detect if an image is missing and replace it with a default image instead
of the dreaded RED X showing up.

So - Is Javascript the way? Or should I look elesewhere?

Thanks in Advance!

推荐答案

杰克说以下10 / 17/2005 5:11 PM:
Jake said the following on 10/17/2005 5:11 PM:
不确定这是否可以用javascript完成,但我想找到一种方法来检测图像是否缺失和替换它带有默认图像而不是可怕的RED X出现。


使用javascript无法可靠地完成。

所以 - Javascript是这样的吗?


No.

或者我应该在哪里看?
Not sure if this can be done with javascript but I would like to find a way
to detect if an image is missing and replace it with a default image instead
of the dreaded RED X showing up.
It can''t be done reliably with javascript.
So - Is Javascript the way?
No.
Or should I look elesewhere?




是的。你应该看看可靠的主机,这将使你的图像

可用。然后你没有Red X的问题。


-

Randy

comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组每周



Yes. You shoould look into dependable hosting that will make your images
available. Then you don''t have the Red X problem.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


>检测图像是否丢失并用默认图像替换
> to detect if an image is missing and replace it
,而不是显示可怕的红色X.
with a default image instead of the dreaded
RED X showing up.




< img src =" some.gif" onerror =" this.src =''other.gif'';">


你好......



<img src="some.gif" onerror="this.src=''other.gif'';">

Hi there...


VK在2005年10月17日下午7:20发表以下内容:
VK said the following on 10/17/2005 7:20 PM:
检测图像是否缺失并替换它带有默认图像而不是可怕的红色X.
to detect if an image is missing and replace it
with a default image instead of the dreaded
RED X showing up.



< img src =" some.gif" onerror =" this.src =''other.gif'';">


<img src="some.gif" onerror="this.src=''other.gif'';">




如果other.gif不可用?
< br $> b $ b -

兰迪

comp.lang.javascript常见问题 - http://jibbering.com/faq


这篇关于替换破碎的图像???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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