The File API isn't working in IE9

五迷三道 提交于 2019-12-17 10:06:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!