Apps脚本htmlservice表单处理示例jquery

时间:2013-09-24 21:14:26

标签: javascript jquery google-apps-script

只是寻找一些关于如何实现Apps Script htmlservice表单处理示例jquery的示例。 Google文档对我来说还不够(https://developers.google.com/apps-script/guides/html-service)。

1 个答案:

答案 0 :(得分:0)

在下面的链接中,您将找到在Html服务中使用JQuery和Carousel的示例。

https://script.google.com/d/1Qk3-RG9ilqeOsDgQIC5xcMXNs8Y5hhoViNptCry5GRhlFGu14JaPmzWy/edit?usp=sharing

任何麻烦都让我知道。

- 原始代码: - 那页

<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-carousel.js"></script>

<div id="carousel-example-generic" class="carousel slide">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner">
    <div class="item active">
      <img src="https://si0.twimg.com/profile_images/2042490978/SRC_HiRes_RGB_Twitter.jpg" alt="Teste">
      <div class="carousel-caption">
        Abc
      </div>
    </div>
    <div class="item ">
      <img src="https://www.src.org/web/img/src-logo-print.png" alt="Teste 2">
      <div class="carousel-caption">
        Abc 2
      </div>
    </div>
        <div class="item ">
      <img src="https://si0.twimg.com/profile_images/2042490978/SRC_HiRes_RGB_Twitter.jpg" alt="Teste 3">
      <div class="carousel-caption">
        Abc 3
      </div>
    </div>    
  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
        <span class="icon-prev"></span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
    <span class="icon-next"></span>
  </a>
</div>
<script>
$('.carousel').carousel();
</script>

- 应用脚本

function doGet() {
  return HtmlService.createTemplateFromFile("pag.html").evaluate().setSandboxMode(HtmlService.SandboxMode.NATIVE);
}