急!!! 用javascript脚本对客户端二进制文件操作!!!

zf_sxl 2002-06-25 05:01:16
我用new ActiveXObject("Scripting.FileSystemObject");
对客户端文件操作,OpenTiextFle只能对文本文件,有什么函数可对任何二进制文件操作。
...全文
79 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiushuiwuhen 2002-06-27
  • 打赏
  • 举报
回复
vbs的二进制操作比js的强,呵呵
westfly 2002-06-27
  • 打赏
  • 举报
回复
如果非要用js对二进制文件操作,可以自己写个组件来调用。
qiushuiwuhen 2002-06-26
  • 打赏
  • 举报
回复
http://www.blueidea.com/bbs/archivecontent.asp?id=367658
saucer 2002-06-26
  • 打赏
  • 举报
回复
according to
The Wonders of the File System Object
http://www.15seconds.com/issue/000816.htm

"............
The FSO does have some weaknesses - for instance, it stumbles on binary files. This includes MS Word documents, many image formats, and, unfortunately, a lot of other files. You can still, however otherwise manipulate these files - move them, delete them, etc. What you can't do is open, read, or write to them. Given some ingenuity, a method could be devised to use the FSO to play with binary files, but many will find it easier to simply use the old Open method (check out MSDN for an example).
....."

you might want to play with ADODB.Stream object
shwaresoft 2002-06-26
  • 打赏
  • 举报
回复
学习!
silentlamb 2002-06-26
  • 打赏
  • 举报
回复
这样还是不太好用,adodb.stream的确可以用loadFromFile()/saveToFile()/read()/write()实现对二进制文件的操作,可read方法的返回值在js中不可以操作?除了可以按字节取出需要的内容外,不能转为字符串/数字或其它对象,不能进行连接、位操作等:(
这样还有什么意义呢
apple749769 2002-06-25
  • 打赏
  • 举报
回复
对任何二进制文件操作你可以通过dephi或者vc来做到。用js我还没有听说过!

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧