在mscript中通过external.get_tab取得的Window对象问题 |
vA0TS4 http://blog.numino.net/ 希望有人指点迷津: BetgyX http://blog.numino.net/ 我在mscript中,通过var oWin=external.get_tab(%max_security_id, external.cur_sel);语句取得了window对象,但使用中发现,这时的oWin和Javascript中的Window对象还是有不同,我发现以下问题: zsikvB http://blog.numino.net/ 1、mscript中,oWin中使用event对象(如使用语句oWin.event.altKey检测Alt键是否按下)会出错,提示“缺少对象”,在Javascript中用window.event.altKey就不会。 r9Tfl0 http://blog.numino.net/ 2、mscript中,处理框架时,oWin.frames(i).document ... 会出错,在Javascript中用window.frames(i).document ... 就不会 (晕,一用[]就变Discuz!代码了,只能用()代替) oNn9Eh http://blog.numino.net/ Re: 试试 oWin.contentWindow.document ETSk1i http://blog.numino.net/ 因为我调用FSO及Word对象进行文件写入操作,Javascript中会有安全限制,不用mscript有什么好方法? O6I1D6 http://blog.numino.net/ 要不只能做面COM控件了 sR1PAA http://blog.numino.net/ Re: wIPBdO http://blog.numino.net/ mscript 的执行方式是比较特别的,可以想像为把 dom 拿到某个地方,执行 mscript,然后放会页面。之后 dom 发生的事不会再牵涉 mscript 的了。 Kw0Kn1 http://blog.numino.net/ 普通 script 用 maxthon 插件命令便能使用 FSO: Owz6zx http://blog.numino.net/ var oFSO=external.max_activex(%max_security_id, 'Scripting.FileSystemObject'); 535OdP http://blog.numino.net/ 当然用完最好立即跟手清除,避免留在页面上。
|
|