【发布时间】:2016-04-19 07:32:45
【问题描述】:
我安装了 Google chrome 扩展程序 cjs(用于网站的自定义 JavaScript)。
如果我在 cjs 编辑器中编写脚本,该脚本工作正常:
我将脚本写在一个 js 文件中,并将其放入我的 IIS 中,如下所示:
- 打开 IIS 管理器
- 右键单击默认网站
- 添加应用程序
- 别名 = googleScript
- 物理路径:C:\scripts\google(例如)
- 我创建了一个 googleScript.js 文件并将其保存在 C:\scripts\google 中。文件内容为:alert("Google");
- 我点击了Connect As并选择应用程序用户(直通身份验证)
- 我打开了位于 googleScript(在 IIS 中)中的 默认文档,并添加了一个名为:googleScript.js 的新默认文档
- 当我右键单击 googleScript 并选择 Manage Application->Browse 时,正在使用我编写的脚本打开一个新网页。页面的url是http://localhost/googleScript/
- 现在回到 cjs 扩展,而不是 alert("Google"); 我写的是 //localhost/googleScript/googleScript.js;。
调用脚本文件时,警报不再起作用。从 cjs chrome 扩展调用脚本文件的正确方法是什么?
【问题讨论】:
标签: javascript google-chrome iis google-chrome-extension