JQueryを使用して、ファイルサイズを確認し、フォームファイルの入力フィールドに入力しています。HTMLは次のとおりです。
<input name="source" id="imageFile" type="file" style ="border: 1px solid #576675;">
およびJQuery:
$('#imageFile').bind('change', function() {
var imageSize = this.files[0].size/1048576;
var imageType = this.files[0].type.toString();
//.... checking different condition for imageSize and imageType....///
});
コードはFireFoxとChromeの両方で機能しますが、IE9では次のエラーが発生します。
SCRIPT5007: Unable to get value of the property '0': object is null or undefined
私はこの投稿を読みましたが、IE9でこれを行う方法は本当にありませんか?
ありがとう...