为什么此代码在Internet Explorer 9中不起作用?
function GetFile(FileName) {
var Contents1=null;
var Stream;
Stream = new ActiveXObject("ADODB.Stream")
Stream.Type = 1 //Binary
Stream.Open()
Stream.LoadFromFile(FileName)
Contents1 = Stream.Read()
FileSize = Stream.Size
Stream.Close()
return Contents1;
}
答案 0 :(得分:0)
Contents1 = Stream.Read(-1); //-1 adReadAll