用于在文件上传控件中验证图像格式的Javascript [英] Javascript to validate Image formats in fileupload control

查看:83
本文介绍了用于在文件上传控件中验证图像格式的Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我怎样才能通过javascript.file验证控件中的图像???

我有3个Fileupload控件处于窗体中,我想检查这3个图像格式是否在有效图像中,或者不是在单个按钮中单击...

谢谢
JAGADiSH V ..

Hi friends.,

how can i validate an image in fileupload control through javascript..??

i have 3 Fileupload controls in a form and i want to check those 3 Image formats are in valid images or not in a single button click...

Thanks
JAGADiSH V..

推荐答案

尝试这些

检查FileUpload控件的文件扩展名 [如何检查上传文件扩展名(JavaScript) [ ^ ]
Try these

Check file extension of FileUpload control[^]
How to check upload file extension (JavaScript)[^]


您可以使用MSDN链接中提供的脚本,然后检查将图像传递到的img标签是否大于0x0(即在).
You may be able to use the script giving in the MSDN link and then check if the img tag you pass the image to, is bigger than 0x0 ( i.e. has an image in it ).


http://social.msdn.microsoft.com/Forums/zh-CN/netfxjscript/thread/f65a6d3b-15ec-4c0d-a79b-53441d71b7e9/ [

这篇关于用于在文件上传控件中验证图像格式的Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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