<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body onload="sample()">
<p id="memo"></p>
<?!= HtmlService.createHtmlOutputFromFile('sample').getContent(); ?>
</body>
</html>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
function sample(){
google.script.run
.withSuccessHandler(function() {
$("#memo").html("abc");})
.withFailureHandler(function(msg) {})
.f();
}
</script>
function doGet(e) {
var template = HtmlService.createTemplateFromFile('index');
return template.evaluate()
.setTitle('ノート')
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
}
function f() {
var doc = DocumentApp.create("メモ");
var p1 = doc.appendParagraph("猫は猫");
p1.setFontSize(24);
var p2 = doc.appendParagraph("自動生成したドキュメントです。");
p2.setFontSize(12);
p2.appendText("どんなもんでしょ?");
doc.saveAndClose();
}
最終更新:2016年03月18日 15:45