this.ReadAll = function() { //Create Stream object - needs ADO 2.5 or heigher //var BinaryStream = WScript.CreateObject("ADODB.Stream") var BinaryStream = new ActiveXObject("ADODB.Stream"); //Specify stream type - we cheat and get string but 'like' binary BinaryStream.Type = adTypeText; BinaryStream.CharSet = codePage; //Open the stream BinaryStream.Open(); //Load the file data from disk To stream object BinaryStream.LoadFromFile(this.path); //Open the stream And get binary 'string' from the object var what = BinaryStream.ReadText; // Clean up BinaryStream.Close(); return this.Backward437(what); }
JavaScript读二进制文件并用ajax传输二进制流的方法(2)
内容版权声明:除非注明,否则皆为本站原创文章。