无法使jQuery警报在Google Apps脚本中工作

苏杰·帕德克(Sujay phadke)

我无法在我的GAS项目中使用jQuery警报。我能够包括这样的基本jquery库:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

但是,如果我尝试使用jAlert包括这些内容:

<script src="https://jquery.alerts.js" type="text/javascript"></script>
<link href="https://jquery.alerts.css" rel="stylesheet" type="text/css">

我在控制台中收到一条错误消息:“ net :: ERR_NAME_NOT_RESOLVED”。

如何包含供GAS使用的jquery警报库?

注意:jquery.alerts.js网站是否处于活动状态?我在那里看不到任何内容(我是新手。我不知道该网站应该存在还是不存在)。

tagplus5

您可以在Google Apps脚本项目中添加jquery.alerts源。在Google Apps脚本项目中,创建html文件jquery.alerts.css.html并将其源代码放入标记样式中,例如

<style> popup_container { font-family: Arial, sans-serif; font-size: 12px; min-width: 300px; /* Dialog will be no smaller than this */ /*...and other code*/ </style>

比创建HTML文件jquery.alerts.js.html并将源代码放入标记脚本中,例如

<script type="text/javascript"> (function($) {
$.alerts = { verticalOffset: -75, horizontalOffset: 0, repositionOnResize: true, /*...and other code*/ </script>

然后,当您可以将此库与html服务一起使用时。例:

<html> <?!= include('jquery.alerts.css.html'); ?> <?!= include('jquery.alerts.js.html'); ?> <head> <base target="_top"> </head> <body> <div> <a href="http://google.com">Click Me!</a> </div> </body> </html>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Google Apps脚本:jQuery无法正常工作

方法“ moveActiveSheet”在Google Apps脚本(JavaScript)中无法正常工作

Google Apps脚本:autoResizeColumn无法正常工作

如何使RegExp工作?(Google Apps脚本)

为什么此Google Apps脚本的参数无法正常工作?

容器绑定Google Apps脚本中的jQuery?

Google Apps脚本,用于将多个工作表中的数组复制到单个状态摘要工作表中

在Google Apps脚本中创建所有工作表名称的列表

如何使用 For 循环在 Google Apps 脚本中的工作表索引号上循环制表符?

Google 表单审批工作流程 | Apps 脚本中的问题:“执行该操作需要授权。”

使用Google Apps脚本复制工作表范围中的某些行

Google Apps脚本读取并匹配不同工作表中的单元格值

Google Apps脚本:如何在工作表中获取条件格式规则,包括每个规则的值

使用 Google Apps 脚本转到工作表中包含今天日期的单元格

使用 Google Apps 脚本将 kmz 中的数据写入工作表

Google Sheets Apps 脚本:将选定的单元格复制到新的工作表中

在Google Sheets Apps脚本中,如何检查工作表是否存在以及是否不添加工作表

如果工作表1和工作表2中都存在值,则复制行,并将其粘贴到工作表3中。Google表格。Google Apps脚本

Google Apps脚本,选择一个工作表-在第一个工作表标签中设置值-而不是特定的工作表标签

按单元格颜色直接在Google Apps脚本中对Google工作表值进行排序

如何检查工作表名称/字符串在Google Apps脚本中是否同时包含字母和数字-JavaScript

正则表达式执行时间限制如何在Google Apps脚本中工作?

如何在电子表格文件中的所有工作表上运行Google Apps脚本?

工作表单元格中的 Google Apps 脚本 setFormula() 遇到“#REF!” 使用函数 doGet(e) 发出问题

为什么 Google Apps 脚本没有将每次迭代作为工作表中的一行推送?

Google Apps 脚本中的 Google Drive 通知

无法在Google Apps脚本中获取Sheet ID

Google Apps脚本无法识别我的文档中的表格

.length在Google Apps脚本中无法处理数组