close
var ext = $('#my_file_field').val().split('.').pop().toLowerCase();if($.inArray(ext,['gif','png','jpg','jpeg'])==-1){ alert('invalid extension!');}
you could use$('#file_field').change(function(){// above check});
http://stackoverflow.com/questions/651700/how-to-have-jquery-restrict-file-types-on-upload
全站熱搜
留言列表