可能重复:
Check if image exists with given url using jquery
Change image source if file exists检查,如果图像不存在使用JavaScript
我从一个文本框抛出图像路径的价值为boxvalue并要验证是否图像存在使用JavaScript。
var boxvalue = $('#UrlQueueBox').val();
我浏览了stackoverflow,发现下面的图片宽度/高度,但不想使用它。
var img = document.getElementById('imageid');
如何验证它是否真的是图像路径中的图像?
看这个线程:HTTP ://fackipeflow.com/问题/ 5678899/change-image-source-if-file-exists –
@FelipeOriani这是为了创造一个新的形象。 – X10nD
你的问题到底是什么?我在你的文章中没有看到任何问号... – maerics