用JavaScript如何打开txt文本?像双击打开的那种效果,可以将txt文本文件弹出来,不是后台打开操作。这样一来,可以直接在文本中输入其它字符串。
用WScript.Shell的run方法
var s = new ActiveXObject("WScript.Shell"), filepath = "d:\\a.txt"; s.run("notepad "+filepath) s = null; window.close()