问题
I'm trying to get the file size and file type from an input field from my form using jQuery. I thought it was working however apparently not in IE 9. Any insight would be greatly appreciated
var my_field = this.files[0];
var myInteger = parseInt(my_field.size);
var myType = my_field.type;
回答1:
Im trying to get the file size and file type from an input field...
That requires the File API, which isn't supported by IE9.
(And note that size
is already a number [on browsers that support the File API], no need to parseInt
it.)
来源:https://stackoverflow.com/questions/16305532/the-file-api-isnt-working-in-ie9