I have a file upload control <input id="File1" type="file" />
in my page... How to check an input type="file" has a file or not using jquery on click of a button upload
?
views:
33answers:
2
+1
A:
$('#upload').bind('click', function(e){
if( $('#File1').val() != ""){
// file selected
}
else{
// no file selected
}
});
Kind Regards
--Andy
jAndy
2010-04-15 05:46:42