我想检查fileupload是否在表单中 [英] I want check whether fileupload is in the form or not

查看:86
本文介绍了我想检查fileupload是否在表单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表单只有一个fileupload按钮,当表单加载后,通过单击一个按钮,该用户可以逐个多达5个文件上载。因此,他们可以一次上传5个文件,或者单个文件,这是用户的选择。现在我想知道用户是否选择了第二个文件上载),以便我的验证应该已经更改。

Hi i have a form which is having only one fileupload button when the form load, after that user can have multiple fileuploads upto 5 one by one, by clicking a button. So they can upload 5 files at a time, or else single file, it''s users choice. Now i want know whether user selected the second fileupload), so that my validation should have been changed.

推荐答案

添加它们时,可以为FileUpload标记提供ID到页面,然后当然你可以通过ID搜索它们(使用getElementById)



或者你可以选择所有JS FileUpload元素然后看看它们是否与你的匹配标准。



干杯,

Edo
You can give IDs to the FileUpload tags when you add them to the page, and then of course you can search them by ID (using getElementById)

Or you can select all the JS FileUpload elements and then see if they match your criteria.

Cheers,
Edo


这篇关于我想检查fileupload是否在表单中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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