我正在使用JavaScript驗證瀏覽字段。由於IE不支持files[0]
,因此我爲IE使用了另一個代碼。錯誤:「激活服務器不能創建對象」在IE瀏覽器
var myFSO = new ActiveXObject("Scripting.FileSystemObject");
var filepath = document.upload.file.value;
var thefile = myFSO.getFile(filepath);
var size = thefile.size;
我已經啓用的ActiveX的瀏覽器,但我依然得到錯誤的「激活服務器不能創建對象」
可能重複[IE8 ActiveXObject問題](http://stackoverflow.com/questions/2964531/ie8-activexobject-problem) – epascarello