Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使jQuery警报在Google应用程序脚本中工作_Jquery_Google Apps Script - Fatal编程技术网

无法使jQuery警报在Google应用程序脚本中工作

无法使jQuery警报在Google应用程序脚本中工作,jquery,google-apps-script,Jquery,Google Apps Script,我无法让jQuery警报在我的GAS项目中工作。我可以像这样包含基本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/jq

我无法让jQuery警报在我的GAS项目中工作。我可以像这样包含基本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\u NAME\u NOT\u RESOLVED”

如何包含用于GAS的jquery警报库


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

你可以在你的谷歌应用脚本项目中添加jquery.alerts源。 在谷歌应用程序脚本项目中,创建html文件jquery.alerts.css.html,并将其源代码放入标签样式中


弹出式容器{
字体系列:Arial,无衬线;
字体大小:12px;
最小宽度:300px;/*对话框将不小于此值*/
/*…和其他代码*/

然后创建html文件jquery.alerts.js.html,并将其源代码放入标记脚本中


(函数($){
$。警报={ 垂直偏移:-75, 水平偏移量:0, RespositionResize:true, /*…和其他代码*/

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



您需要将文件jquery.alerts.js和.css保存到https Web服务器。Google站点,或者dropbox能够承载文件。您好。感谢您的回复。您知道有任何公共托管的jquery警报文件吗?我想,由于这是一个常用的库,因此在一些公共Web服务器.jQueryUI上很容易获得(您已经包括在内)内置了对话框功能:完成了这项工作,效果很好,谢谢!(其他用户注意:您必须从文件中创建模板输出,并使用谷歌应用服务器include。详细信息如下:)