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
Google apps script jquery在google应用程序脚本中运行_Google Apps Script - Fatal编程技术网

Google apps script jquery在google应用程序脚本中运行

Google apps script jquery在google应用程序脚本中运行,google-apps-script,Google Apps Script,根据新的google apps脚本HTML服务API的要求,我已经在新的html5文件中包含了以下jquery元标记,但是jquery语法似乎不起作用,如下面显示成功服务器调用的数组返回值的代码片段所示 我仍然强制使用标准css或HTML标记进行格式化,以生成所需的输出,而不是使用非常简洁的jQuery语法调用 <!DOCTYPE html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jqu

根据新的google apps脚本HTML服务API的要求,我已经在新的html5文件中包含了以下jquery元标记,但是jquery语法似乎不起作用,如下面显示成功服务器调用的数组返回值的代码片段所示

我仍然强制使用标准css或HTML标记进行格式化,以生成所需的输出,而不是使用非常简洁的jQuery语法调用

<!DOCTYPE html>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>


<input type="text" id='file_txt' size='100' value="" style="visibility:hidden" readonly/>


<p></p>

<a id="Hyperlink" style="visibility:hidden">File Location</a>
<script>
function  rep1(linkid){

//$("Hyperlink").show();

x=document.getElementById("Hyperlink");
x.style.visibility="visible";
x.href=linkid[1];
x.text="File HyperLink :"+linkid[0];

y=document.getElementById("file_txt");
y.value=linkid[2];
y.style.visibility='visible';
y.style.color='red';

}
google.script.run   
  .withSuccessHandler(rep1) 
  .onOpen1();
</script>

文件位置 函数rep1(linkid){ //$(“超链接”).show(); x=document.getElementById(“超链接”); x、 style.visibility=“可见”; x、 href=linkid[1]; x、 text=“文件超链接:”+linkid[0]; y=document.getElementById(“文件_txt”); y、 value=linkid[2]; y、 style.visibility='visible'; y、 风格:颜色=红色; } google.script.run .withSuccessHandler(rep1) .onOpen1();
尽管HtmlService的文档说明所有最近的JQuery库都是兼容的,但我在使用高于1.9.1的版本时遇到了问题

尝试:



相反

截至2015年6月28日,这仍然是准确的。如果您试图包含较新的版本,jQuery最终只是没有定义,没有明显的错误,这使得故障排除变得特别困难。
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>