阅读:1312回复:1
求助一个js问题
有个脚本里面的一句
this.shellServicr.openApplicationWithURI(this.browser,aURI.spec); 把当前url,http://xxx,传递给前面程序 我现在想让程序接受到的url是加上双引号的,"http://xxx",然后写成 this.shellServicr.openApplicationWithURI(this.browser,' " '+aURI.spec+' " '); 结果程序收到的的是 \"https://xxx\",多了两个反斜杠。 请问下那个地方怎么写? 谢谢。 shellServicr是这么定义的: shellServicr:Cc["@mozilla.org/browser/shell-service;1"].getService(Ci.nsIShellService), |
|
|
1楼#
发布于:2017-04-07 21:47
app:"C:\\xxx",
file:Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile), process:Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess), file.initWithPath(app); process.init(file); var args = [gBrowser.currentURI.spec]; process.run(false, args, args.length); 怎么才能让最后传递到app的url是加了双引号的 "http://xxx" 而不是 http://xxx 这种的啊? |
|
|