Google协作平台中的JavaScript/jQuery限制?

Yar*_*rin 4 javascript jquery google-sites

我的客户有一个谷歌网站,并要求一些jQuery/javascript功能,如灯箱等.我可以假设我可以解决大多数通用的jQuery/javascript功能(通过小工具API),还是我需要了解的限制?

谢谢-

Dut*_*432 8

哇我只是Google Sites JQuery谷歌搜索,第一页是谷歌常见问题解答回答你的问题.

我可以在Google网站上使用JQuery吗?

最受欢迎的答案:

是的你可以.一步一步:为您的网站添加"安全html绕过"小工具.然后在小工具的属性部分中插入此html:

<script type="text/javascript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)

之后,您可以通过添加更多html元素和javascript来使用jquery. 示例代码:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<input type="text" value="oerten" id="text" onclick="" />
<input type="button" value="Click" id="but" onclick="var val=$('#text').attr('value');alert(val);" />
<br />  
Run Code Online (Sandbox Code Playgroud)
Just paste this code snippet into the
"HTML Code" section of the "safe html
bypass" gadget. Save it and go
Run Code Online (Sandbox Code Playgroud)

进一步阅读:

如何使用小工具向Google网站添加javascript或自定义内容