如何在javascript中验证图像 [英] how to validate images in javascript
本文介绍了如何在javascript中验证图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序中有2张图像.
如何在javascript中验证图像验证.
1张图像可用,第二张图像不可用.
这次如何在javascript中进行验证.
i have 2 images in my application.
how to validate images validation in javascript.
1 image is available and 2nd image is not available.
This time how to validation in javascript.
推荐答案
请参见以下方法:
See this method:
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
<script>
(函数(){// 页面完全加载时调用
(" img.deferred").each(// 每个延迟的图像 var tochange = 此; // 这是我们将要更改的图像 var altsrc =
("img.deferred").each(function(index) { // for each deferred image var tochange = this; // this is the image we will change var altsrc =
这篇关于如何在javascript中验证图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文